diff --git a/DokanNet/DokanOperationProxy.cs b/DokanNet/DokanOperationProxy.cs index 2558662e..4929e992 100644 --- a/DokanNet/DokanOperationProxy.cs +++ b/DokanNet/DokanOperationProxy.cs @@ -408,7 +408,7 @@ public NtStatus ReadFileProxy( try { result = operations.ReadFile(rawFileName, buffer, out rawReadLength, rawOffset, rawFileInfo); - Marshal.Copy(buffer, 0, rawBuffer, (int)rawBufferLength); + Marshal.Copy(buffer, 0, rawBuffer, rawReadLength); } finally {