mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 13:29:24 +02:00
* 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:
parent
39c553707e
commit
50ebeaad5e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user