mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-15 08:06:04 +02:00
* fix concat_multi for widestrings, patch was already done for ansistrings fixes 8292
git-svn-id: trunk@6384 -
This commit is contained in:
parent
99bc1ccb75
commit
ebccbf720c
@ -501,6 +501,7 @@ Var
|
||||
p,pc : pointer;
|
||||
Size,NewLen,
|
||||
OldDestLen : SizeInt;
|
||||
destcopy : widestring;
|
||||
begin
|
||||
if high(sarr)=0 then
|
||||
begin
|
||||
@ -509,17 +510,19 @@ begin
|
||||
end;
|
||||
lowstart:=low(sarr);
|
||||
if Pointer(DestS)=Pointer(sarr[lowstart]) then
|
||||
inc(lowstart);
|
||||
{ Check for another reuse, then we can't use
|
||||
the append optimization }
|
||||
for i:=lowstart to high(sarr) do
|
||||
begin
|
||||
inc(lowstart);
|
||||
{ Check for another reuse, then we can't use
|
||||
the append optimization }
|
||||
for i:=lowstart to high(sarr) do
|
||||
if Pointer(DestS)=Pointer(sarr[i]) then
|
||||
begin
|
||||
if Pointer(DestS)=Pointer(sarr[i]) then
|
||||
begin
|
||||
lowstart:=low(sarr);
|
||||
break;
|
||||
end;
|
||||
{ if DestS is used somewhere in the middle of the expression,
|
||||
we need to make sure the original string still exists after
|
||||
we empty/modify DestS }
|
||||
destcopy:=dests;
|
||||
lowstart:=low(sarr);
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
{ Start with empty DestS if we start with concatting
|
||||
|
Loading…
Reference in New Issue
Block a user