Only call moved if len>0, as otherwise astring local variable is nil, which leads to a range check error for astring[1]

git-svn-id: trunk@40132 -
This commit is contained in:
pierre 2018-11-01 07:09:47 +00:00
parent 96460b70b2
commit 3b49fda0a2

View File

@ -1820,7 +1820,8 @@ begin
begin
len:=gettokenbufsizeint;
setlength(astring,len);
move(tokenbuf[tbi],astring[1],len);
if len>0 then
move(tokenbuf[tbi],astring[1],len);
write([' ',astring]);
inc(tbi,len);
end;