소스 검색

* really copy widestrings in widestr_assign when winlike wistrings are used

git-svn-id: trunk@4151 -
florian 19 년 전
부모
커밋
096fb2dcb8
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      rtl/inc/wstrings.inc

+ 2 - 1
rtl/inc/wstrings.inc

@@ -368,7 +368,8 @@ begin
 {$ifdef FPC_WINLIKEWIDESTRING}
   { Decrease the reference count on the old S1 }
   fpc_widestr_decr_ref (S1);
-  S1:=S2;
+  S1:=NewWidestring(length(WideString(S2)));
+  move(s2^,s1^,length(WideString(s1))*sizeof(widechar));
 {$else FPC_WINLIKEWIDESTRING}
   If S2<>nil then
     If PWideRec(S2-WideFirstOff)^.Ref>0 then