summaryrefslogtreecommitdiff
path: root/src/support/safe_integer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/safe_integer.cpp')
-rw-r--r--src/support/safe_integer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/support/safe_integer.cpp b/src/support/safe_integer.cpp
index 4afc7afea..d99508b17 100644
--- a/src/support/safe_integer.cpp
+++ b/src/support/safe_integer.cpp
@@ -125,7 +125,7 @@ bool wasm::isInRangeI64TruncU(int32_t i) {
* ---------------------------------
* 0 00000000000 0000...000000...000 0x0000000000000000 => 0
* 0 10000011101 1111...111000...111 0x41dfffffffffffff => 2147483647.9999998 (rounds down to INT32_MAX)
- * 0 10000011110 1111...111100...000 0x41efffffffe00000 => 4294967295 (UINT32_MAX)
+ * 0 10000011110 1111...111111...111 0x41efffffffffffff => 4294967295.9999995 (rounds down to UINT32_MAX)
* 0 10000111101 1111...111111...111 0x43dfffffffffffff => 9223372036854774784 (~INT64_MAX)
* 0 10000111110 0000...000000...000 0x43e0000000000000 => 9223372036854775808
* 0 10000111110 1111...111111...111 0x43efffffffffffff => 18446744073709549568 (~UINT64_MAX)
@@ -152,7 +152,7 @@ bool wasm::isInRangeI32TruncS(int64_t i) {
bool wasm::isInRangeI32TruncU(int64_t i) {
uint64_t u = i;
- return (u <= 0x41efffffffe00000ULL) ||
+ return (u <= 0x41efffffffffffffULL) ||
(u >= 0x8000000000000000ULL && u <= 0xbfefffffffffffffULL);
}