* fixed fpc_ansistr_append_ansistring() in case it's called to append a

string to itself

git-svn-id: trunk@1961 -
This commit is contained in:
Jonas Maebe 2005-12-15 15:22:35 +00:00
parent 39c553707e
commit 50ebeaad5e

View File

@ -463,13 +463,15 @@ end;
Procedure fpc_ansistr_append_ansistring(Var S : AnsiString;const Str : AnsiString); [Public,Alias : 'FPC_ANSISTR_APPEND_ANSISTRING']; compilerproc;
var
ofs : SizeInt;
ofs, strlength : SizeInt;
begin
if Str='' then
exit;
{ needed in case s and str are the same string }
strlength := length(str);
ofs:=Length(S);
SetLength(S,ofs+length(Str));
move(Str[1],S[ofs+1],length(Str)+1);
move(Str[1],S[ofs+1],strlength+1);
end;
Function Fpc_Ansistr_Copy (Const S : AnsiString; Index,Size : SizeInt) : AnsiString;compilerproc;