소스 검색

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

ccrause 2 년 전
부모
커밋
031c16dd3c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      rtl/inc/generic.inc

+ 1 - 1
rtl/inc/generic.inc

@@ -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;