I noticed today that in D2009 (with update 1), TStringStream.ReadString does not move the Position in the Stream anymore like it used to do up to D2007.
So, looping on MyStringStream.ReadString(10) would always read the 1st 10 chars of the stream instead of moving along and getting all the stream 10 chars by 10 chars.
I checked the doc, it still says that ReadString should move the Position...
Can anyone confirm if it is a bug in the D2009 code or if there has been a design change (and why) and the doc is obsolete?
Thanks...
Update: Reported issue in QC #68582
Definitely a bug and an ugly compatibility breakage. If you check the Classes.pas, you'll see Unicode and non-Unicode version of the ReadString. Non-Unicode version is incrementing the FPosition while Unicode is not. Both original D2009 and Update 1 are behaving the same.
Please report it in QC.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With