summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/support/safe_integer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/support/safe_integer.cpp b/src/support/safe_integer.cpp
index dbe62ca52..39c7ee2d0 100644
--- a/src/support/safe_integer.cpp
+++ b/src/support/safe_integer.cpp
@@ -36,7 +36,7 @@ bool wasm::isSInteger32(double x) {
uint32_t wasm::toUInteger32(double x) {
assert(isUInteger32(x));
return x < std::numeric_limits<uint32_t>::max()
- ? x
+ ? (uint32_t)x
: std::numeric_limits<uint32_t>::max();
}