[fpc-devel] TStrings.Assign bug + patch

Paul Ishenin ip at kmiac.ru
Wed Apr 23 09:26:22 CEST 2008

Hello,  FPC developers' list.

I found a bug in TStrings.Assign. TStrings has FLBS (line break style) 
field which assigned from default value in CheckSpecialChars. 
FSpecialCharsInited controls whether CheckSpecialChars had been called 

But in TString.Assign FSpecialCharsInited setted to value from source 
and all other fields setted from source except FLBS. This cause errors 
when you assign initialized list to uninitialized. FLBS will stay 
undefined in this case.

Attached patch fixes this bug.

Please apply to trunk and fixes_2_2 since lcl and lazarus ide depends on it.

Best regards,
Paul Ishenin.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rtl_strings_bug_trunk.patch
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20080423/3d95bd53/attachment.ksh>

More information about the fpc-devel mailing list