Prechádzať zdrojové kódy

* 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 rokov pred
rodič
commit
14107b42b2
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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) }