[Patch] Fix TStringStream.WriteUnicodeString
Original Reporter info from Mantis: Delphi-Sucks
-
Reporter name: Sebastian Hellwig
Original Reporter info from Mantis: Delphi-Sucks
- Reporter name: Sebastian Hellwig
Description:
This patch fixes an issue with the method TStringStream.WriteUnicodeString, which causes it to not work properly.
If the stream is empty the method doesn't write anything to the stream. If the stream has data, the written size is not determined by the size of the string to be written, but by the current size of the stream.
Steps to reproduce:
Call the method TStringStream.WriteUnicodeString and verify the size afterwards:
StringStream := TStringStream.Create('', TEncoding.Unicode, False);
StringStream.WriteUnicodeString('Lorem Ipsum');
// StringStream.Size is 0
Additional information:
As of Revision 49477 the problem still exists.
Mantis conversion info:
- Mantis ID: 38963
- Fixed in revision: 49478 (#c8be89c7)