Explorar o código

* set destination codepage in DefaultUnicode2AnsiMove

git-svn-id: trunk@22247 -
Jonas Maebe %!s(int64=13) %!d(string=hai) anos
pai
achega
e073bf3008
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      rtl/inc/ustrings.inc

+ 3 - 0
rtl/inc/ustrings.inc

@@ -67,6 +67,9 @@ var
   p : PAnsiChar;
 begin
   setlength(dest,len);
+  if not assigned(pointer(dest)) then
+    exit;
+  PAnsiRec(dest)^.CodePage:=cp;
   p:=pointer(dest);         {SetLength guarantees that dest is unique}
   for i:=1 to len do
     begin