Fix bug with RAMDirectory

Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/43cc843d
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/43cc843d
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/43cc843d

Branch: refs/heads/branch_4x
Commit: 43cc843dc64e618af1aae3cdc798ae06d98f39c6
Parents: f682a4a
Author: Paul Irwin <[email protected]>
Authored: Wed Nov 6 13:22:54 2013 -0500
Committer: Paul Irwin <[email protected]>
Committed: Wed Nov 6 13:22:54 2013 -0500

----------------------------------------------------------------------
 src/core/Store/RAMInputStream.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/43cc843d/src/core/Store/RAMInputStream.cs
----------------------------------------------------------------------
diff --git a/src/core/Store/RAMInputStream.cs b/src/core/Store/RAMInputStream.cs
index 0c250a3..e10abcb 100644
--- a/src/core/Store/RAMInputStream.cs
+++ b/src/core/Store/RAMInputStream.cs
@@ -85,7 +85,7 @@ namespace Lucene.Net.Store
 
                 int remainInBuffer = bufferLength - bufferPosition;
                 int bytesToCopy = len < remainInBuffer ? len : remainInBuffer;
-                Array.Copy(currentBuffer, bufferPosition, b, offset, 
bytesToCopy);
+                Buffer.BlockCopy(currentBuffer, bufferPosition, b, offset, 
bytesToCopy);
                 offset += bytesToCopy;
                 len -= bytesToCopy;
                 bufferPosition += bytesToCopy;

Reply via email to