mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 23:50:24 +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
|
begin
|
||||||
widestringmanager.Ansi2WideMoveProc(PChar(Src),temp,Length(Src));
|
widestringmanager.Ansi2WideMoveProc(PChar(Src),temp,Length(Src));
|
||||||
if Length(temp)<DestSize then
|
if Length(temp)<DestSize then
|
||||||
move(temp[1],Dest^,Length(temp))
|
move(temp[1],Dest^,Length(temp)*SizeOf(WideChar))
|
||||||
else
|
else
|
||||||
move(temp[1],Dest^,destsize);
|
move(temp[1],Dest^,(DestSize-1)*SizeOf(WideChar));
|
||||||
|
|
||||||
|
Dest[DestSize-1]:=#0;
|
||||||
|
|
||||||
result:=Dest;
|
result:=Dest;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user