소스 검색

Fixing buffer position change after reading

It seems that only place where we use the buffer for appending is ASCII buffer in SCP code, where ForceLen is true, so the bug would not happen - as Len == Result.

Source commit: d30cccffcba704e0502005721149b50964cf5a7c
Martin Prikryl 5 년 전
부모
커밋
5eb38fd14d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      source/core/FileBuffer.cpp

+ 1 - 1
source/core/FileBuffer.cpp

@@ -79,7 +79,7 @@ DWORD __fastcall TFileBuffer::ReadStream(TStream * Stream, const DWORD Len, bool
     {
       Size = Size - Len + Result;
     }
-    FMemory->Seek(Len, soCurrent);
+    FMemory->Seek(Result, soCurrent);
   }
   catch(EReadError &)
   {