peter green wrote:

oops looks like i commented out the wrong line when changing the
widestringmanager system for improved flexibility.

the code should be:

Function fpc_ShortStr_To_WideStr (Const S2 : ShortString): WideString;
{$ifdef hascompilerproc} compilerproc; {$endif}
{
 Converts a ShortString to a WideString;
}
Var
 Size : SizeInt;
begin
 Size:=Length(S2);
 //Setlength (fpc_ShortStr_To_WideStr,Size);
 if Size>0 then
   begin

widestringmanager.Ansi2WideMoveProc(PChar(@S2[1]),fpc_ShortStr_To_WideStr,Si
ze);
     { Terminating Zero }

PWideChar(Pointer(fpc_ShortStr_To_WideStr)+Size*sizeof(WideChar))^:=#0;
end;
end;


Thanks for the quick response. That fix works for me.
Colin

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to