Explorar o código

* 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 %!s(int64=8) %!d(string=hai) anos
pai
achega
ab0b07e7c6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;