소스 검색

* fixed tw9039{a,b} for 64 bit platforms (qwordvar > int64var) is evaluated
by the compiler as (int64(qwordvar) > int64var), which broke the array
size check for 64 platforms

git-svn-id: trunk@13388 -

Jonas Maebe 16 년 전
부모
커밋
14107b42b2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      compiler/symdef.pas

+ 1 - 1
compiler/symdef.pas

@@ -2366,7 +2366,7 @@ implementation
 
         { prevent overflow, return -1 to indicate overflow }
         { also make sure we don't need 64/128 bit arithmetic to calculate offsets }
-        if (cachedelecount > high(aint)) or
+        if (cachedelecount > aword(high(aint))) or
            ((high(aint) div cachedelesize) < aint(cachedelecount)) or
            { also lowrange*elesize must be < high(aint) to prevent overflow when
              accessing the array, see ncgmem (PFV) }