[fpc-devel] TStrings.Assign bug + patch

Michael Van Canneyt michael at freepascal.org
Wed Apr 23 19:45:26 CEST 2008



On Wed, 23 Apr 2008, Paul Ishenin wrote:

> 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 before.
> 
> 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.

Applied and merged.

Thank you for the patch.

Michael.



More information about the fpc-devel mailing list