Browse Source

* fixed off by one error in fpwidestring.Unicode2AnsiMove, which caused an
extra #0 character to the appended to the result, when converting to UTF-8

git-svn-id: trunk@36498 -

nickysn 8 years ago
parent
commit
ab0b07e7c6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rtl/objpas/fpwidestring.pp

+ 1 - 1
rtl/objpas/fpwidestring.pp

@@ -254,7 +254,7 @@ begin
   if (cp=CP_UTF8) then
     begin
       destLen:=UnicodeToUtf8(nil,High(SizeUInt),source,len);
-      SetLength(dest,destLen);
+      SetLength(dest,destLen-1);
       UnicodeToUtf8(@dest[1],destLen,source,len);
       SetCodePage(dest,cp,False);
       exit;