mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-26 11:32:40 +01:00
- removed unnecessary string copy form tppufile.getstring
git-svn-id: trunk@15459 -
This commit is contained in:
parent
293d51a277
commit
25561d0f71
@ -766,18 +766,15 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
function tppufile.getstring:string;
|
function tppufile.getstring:string;
|
||||||
var
|
|
||||||
s : string;
|
|
||||||
begin
|
begin
|
||||||
s[0]:=chr(getbyte);
|
result[0]:=chr(getbyte);
|
||||||
if entryidx+length(s)>entry.size then
|
if entryidx+length(result)>entry.size then
|
||||||
begin
|
begin
|
||||||
error:=true;
|
error:=true;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
ReadData(s[1],length(s));
|
ReadData(result[1],length(result));
|
||||||
getstring:=s;
|
inc(entryidx,length(result));
|
||||||
inc(entryidx,length(s));
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user