TStreamReader (streamex unit) issue
Original Reporter info from Mantis: apeoperaio @andrea.mauri
-
Reporter name: Andrea Mauri
Original Reporter info from Mantis: apeoperaio @andrea.mauri
- Reporter name: Andrea Mauri
Description:
TStreamReader.ReadLine seems to fail under specific circumstances.
I created a test to easily reproduce the problem.
The test makes use of a TStream that behaves in a weird, but formally correct way. I created it based on a real experience with the StdIn that I was able to reproduce thanks to pre-existing logging.
I believe the bug can be fixed by updating VPByte right after FillBuffer is called:
[...]
FillBuffer;
VPByte := @FBuffer[FBufferPosition]; //bugfix
VPosition := FBufferPosition;
[...]
Additional information:
Tested with Lazarus 2.0.10 FPC 3.2.0 on Win64
Mantis conversion info:
- Mantis ID: 38734
- OS: Windows
- OS Build: Windows10
- Platform: FPC 3.2.0 on Win64
- Version: 3.2.0
- Fixed in revision: 49219 (#a06c18bd)
- Monitored by: » @andrea.mauri (Andrea Mauri)