i belive there was recently a change to how widestring length was stored for OLE compatibility reasons. this bug was probablly caused by that change.
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Jesus Reyes > Sent: 29 January 2006 04:53 > To: FPC developers' list > Subject: [fpc-devel] widestrings length problem > > > It seems something is wrong in widestrings, using the following program: > > {$mode objfpc}{H+} > program test_widestrings; > var > W: WideString; > begin > W := '123456'; > if Length(W)<>6 then > WriteLn('Test1 Failed, it''s ', Length(W)) > else > WriteLn('Test1 Passed'); > > SetLength(W, 6); > if Length(W)<>6 then > WriteLn('Test2 Failed, it''s ', Length(W)) > else > WriteLn('Test2 Passed'); > end. > > It prints: > Test1 Passed > Test2 Failed, it's 12 > > Windows, FPC 2.1.1 revision 2214 > > Jesus Reyes A. > > __________________________________________________ > Correo Yahoo! > Espacio para todos tus mensajes, antivirus y antispam ¡gratis! > Regístrate ya - http://correo.yahoo.com.mx/ > _______________________________________________ > fpc-devel maillist - fpc-devel@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-devel _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel