summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-04-17 14:30:42 +0000
committermarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-04-17 14:30:42 +0000
commitb2371e5d713eda3a8f4ff2dec086233c9657e2ca (patch)
tree3fe8c2b7247cdea5d8c16be8d1ad230ec3e40ba9
parent7dc054c86d87ddcf5b620c75d6b99aa52463642c (diff)
downloadfpc-b2371e5d713eda3a8f4ff2dec086233c9657e2ca.tar.gz
* 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: https://svn.freepascal.org/svn/fpc/trunk@49219 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--packages/fcl-base/src/streamex.pp1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/fcl-base/src/streamex.pp b/packages/fcl-base/src/streamex.pp
index 92684d57b5..a15db45e91 100644
--- a/packages/fcl-base/src/streamex.pp
+++ b/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]);