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.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h
index e35f081c4..7747e1a97 100644
--- a/src/wasm-s-parser.h
+++ b/src/wasm-s-parser.h
@@ -499,7 +499,9 @@ private:
case i32: {
int32_t temp;
if (str[0] == '0' && str[1] == 'x') {
- istr >> std::hex >> temp;
+ uint32_t temp2;
+ istr >> std::hex >> temp2;
+ temp = temp2;
} else {
istr >> temp;
}
@@ -509,7 +511,9 @@ private:
case i64: {
int64_t temp;
if (str[0] == '0' && str[1] == 'x') {
- istr >> std::hex >> temp;
+ uint64_t temp2;
+ istr >> std::hex >> temp2;
+ temp = temp2;
} else {
istr >> temp;
}