TStringList.Text := 'x'; doesn't work
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
When assigning single character to the TStringList.Text property, nothing is actually assigned. I.e. StringList.Text remains '' after the assignment, StringList.Count is 0.
Attached testcase demonstrates this. Output should indicate that SList contains '1', but it doesn't.
Assignments like
SList.Text := '1' + LineEnding;
SList.Text := '12';
SList.Text := '1' + LineEnding + '1';
work OK, so the problem seems to be specific to only single-character assignments.
With FPC 2.0.0 this bug didn't occur. I checked and it occurs with FPC 2.0.2 and FPC 2.0.3 and 2.1.1 (revision 2661).
Additional information:
Reporter: Michalis Kamburelis
EMail: michalis at camelot dot homedns dot org
Mantis conversion info:
- Mantis ID: 6699
- OS: Linux
- Fixed in version: 2.0.4