Browse Source

* small optimization

git-svn-id: branches/jvmbackend@18700 -
Jonas Maebe 14 years ago
parent
commit
5a1bca3b75
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rtl/java/ustrings.inc

+ 1 - 1
rtl/java/ustrings.inc

@@ -64,7 +64,7 @@ begin
   result:='';
   Size:=Length(S2);
   if Size>0 then
-    result:=unicodestring(JLString.Create(TJByteArray(ShortstringClass(@S2).fdata),0,length(S2)));
+    result:=unicodestring(JLString.Create(TJByteArray(ShortstringClass(@S2).fdata),0,Size));
 end;
 
 Function fpc_UnicodeStr_To_AnsiStr (const S2 : UnicodeString): AnsiString; compilerproc;