Browse Source

* Apply fix from bug #0038734 from Andrea Mauri to update vpbyte after fillbuffer in a loop. The second instance of fillbuffer is safe, because it is at the procedure exit, and vpbyte is a local variable.

git-svn-id: trunk@49219 -
marco 4 years ago
parent
commit
a06c18bd07
1 changed files with 1 additions and 0 deletions
  1. 1 0
      packages/fcl-base/src/streamex.pp

+ 1 - 0
packages/fcl-base/src/streamex.pp

@@ -432,6 +432,7 @@ begin
         Move(FBuffer[VPosition], AString[Succ(VStrLength)], VLength);
       end;
       FillBuffer;
+      VPByte := @FBuffer[FBufferPosition];
       VPosition := FBufferPosition;
     end;
   until (FBufferPosition = FBufferRead) or (VPByte^ in [10, 13]);