summaryrefslogtreecommitdiff
path: root/src/wasm-s-parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-s-parser.h')
-rw-r--r--src/wasm-s-parser.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h
index 4c22fb1e3..c3f32e809 100644
--- a/src/wasm-s-parser.h
+++ b/src/wasm-s-parser.h
@@ -23,6 +23,7 @@
#define wasm_wasm_s_parser_h
#include <cmath>
+#include <limits>
#include "wasm.h"
#include "mixed_arena.h"
@@ -825,7 +826,7 @@ private:
ret->align = atoi(eq);
} else if (str[0] == 'o') {
uint64_t offset = atoll(eq);
- if (offset > 0xffffffff) onError();
+ if (offset > std::numeric_limits<uint32_t>::max()) onError();
ret->offset = (uint32_t)offset;
} else onError();
i++;