mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 15:40:16 +02:00
* StringToWideChar fixed
git-svn-id: trunk@1236 -
This commit is contained in:
parent
e5ca17b598
commit
3a5895be0f
@ -682,9 +682,11 @@ function StringToWideChar(const Src : AnsiString;Dest : PWideChar;DestSize : Siz
|
||||
begin
|
||||
widestringmanager.Ansi2WideMoveProc(PChar(Src),temp,Length(Src));
|
||||
if Length(temp)<DestSize then
|
||||
move(temp[1],Dest^,Length(temp))
|
||||
move(temp[1],Dest^,Length(temp)*SizeOf(WideChar))
|
||||
else
|
||||
move(temp[1],Dest^,destsize);
|
||||
move(temp[1],Dest^,(DestSize-1)*SizeOf(WideChar));
|
||||
|
||||
Dest[DestSize-1]:=#0;
|
||||
|
||||
result:=Dest;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user