hotfix for 32bit unsigned 'range' checking; incomplete, unknown why some operations produce range checks
This commit is contained in:
parent
c644bf399f
commit
84ca1f3bf3
2 changed files with 8 additions and 1 deletions
|
|
@ -46,6 +46,12 @@ proc chckRange64(i, a, b: int64): int64 {.compilerproc.} =
|
|||
else:
|
||||
raiseRangeError(i)
|
||||
|
||||
proc chckRangeU(i, a, b: uint64): uint64 {.compilerproc.} =
|
||||
if i >= a and i <= b:
|
||||
return i
|
||||
else:
|
||||
sysFatal(RangeError, "value out of range")
|
||||
|
||||
proc chckRangeF(x, a, b: float): float =
|
||||
if x >= a and x <= b:
|
||||
return x
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue