[fpc-devel] widestrings length problem
peter green
plugwash at P10Link.net
Sun Jan 29 22:55:17 CET 2006
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: fpc-devel-bounces at lists.freepascal.org
> [mailto:fpc-devel-bounces at lists.freepascal.org]On 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 at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list