TFileStream.ReadBuffer fails with TBytes while Delphi works
Original Reporter info from Mantis: rd0x
-
Reporter name:
Original Reporter info from Mantis: rd0x
- Reporter name:
Description:
fResultBytes: TBytes;
In Delphi
TFileStream.ReadBuffer(fResultBytes, fBytesToEnd);
works fine without issues while in FPC it crashes the program or throws an exception (Stream read error)
In FPC and Delphi
TFileStream.ReadBuffer(fResultBytes[0], fBytesToEnd);
works fine
Steps to reproduce:
run the attached program and change the lines for ReadBuffer
Additional information:
happens also on trunk
Mantis conversion info:
- Mantis ID: 35330
- OS: Windows/Linux
- Build: r41756
- Version: 3.2.0
- Fixed in version: 3.3.1
- Fixed in revision: 42042 (#60efc9e8)
- Target version: 3.2.0