Fix potential overflow when incrementing 8 bit high value of res.

This commit is contained in:
ccrause 2022-11-05 11:19:58 +02:00
parent 9b6926c5f5
commit 031c16dd3c

View File

@ -1265,7 +1265,7 @@ var
len: byte;
begin
l:=high(arr)+1;
if l>=high(res)+1 then
if l>=ObjpasInt(high(res))+1 then
l:=high(res)
else if l<0 then
l:=0;