mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-16 04:30:35 +01:00
* 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 -
This commit is contained in:
parent
8832627178
commit
14107b42b2
@ -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) }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user