* fixed fpc_shortstr_concat() in case the max length for the destination is

already smaller than the length of the first string (probably cannot
    happen currently, but may be in the future as a result of optimizations)

git-svn-id: trunk@17886 -
This commit is contained in:
Jonas Maebe 2011-06-30 15:48:52 +00:00
parent 72f2d37bac
commit c5dfa9d354

View File

@ -930,7 +930,11 @@ begin
s1l:=length(s1);
s2l:=length(s2);
if s1l+s2l>high(dests) then
s2l:=high(dests)-s1l;
begin
if s1l>high(dests) then
s1l:=high(dests);
s2l:=high(dests)-s1l;
end;
if @dests=@s1 then
move(s2[1],dests[s1l+1],s2l)
else