On 2025-11-02 20:22, Bart via fpc-devel wrote:
On Sun, Nov 2, 2025 at 1:58 PM Bart <[email protected]> wrote:

 >      ReadBuffer(Result,0);  << second param should be "Size"

Not sure, but this (ReadBuffer(Result,Size);) seems to crash then
(memory corruption)?

This:
     ReadBuffer(Result[0],Size);
seems to work OK though.
(Should be save even if Size is zero, since ReadBuffer does nothing then)

Actually, the ReadBuffer(Result,SIze) is broken due to ReadBuffer(TBytes,Count) being broken. Compiler does not select the correct overload, but the fix for that has not been backported.
The solution would be to add offset zero.

Michael.
_______________________________________________
fpc-devel maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to