Browse Source

* fpc_assign_widestr after a hint of Martin Schreiber fixed, see #7272

git-svn-id: trunk@4502 -
florian 19 years ago
parent
commit
9d14c87da7
1 changed files with 1 additions and 3 deletions
  1. 1 3
      rtl/inc/wstrings.inc

+ 1 - 3
rtl/inc/wstrings.inc

@@ -378,9 +378,7 @@ begin
       inclocked(PWideRec(S2-WideFirstOff)^.ref);
   { Decrease the reference count on the old S1 }
   fpc_widestr_decr_ref (S1);
-  { And finally, have S1 pointing to S2 (or its copy) }
-  fpc_WideStr_SetLength(WideString(s1),length(WideString(s2)));
-  move(s2^,s1^,length(WideString(s1))*sizeof(widechar));
+  s1:=s2;
 {$endif FPC_WINLIKEWIDESTRING}
 end;