diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-07-06 11:44:00 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-07-06 11:50:32 -0700 |
commit | 5287706104bc07394e64bd73b1e1ddbc06b957b5 (patch) | |
tree | 2efdc2729b6299253ff173c893aa7ccbccdfc9eb /src/parsing.h | |
parent | d4d55f9c45740df17f9fc2896e54378c2561d58a (diff) | |
download | binaryen-5287706104bc07394e64bd73b1e1ddbc06b957b5.tar.gz binaryen-5287706104bc07394e64bd73b1e1ddbc06b957b5.tar.bz2 binaryen-5287706104bc07394e64bd73b1e1ddbc06b957b5.zip |
fix parsing of large ints
Diffstat (limited to 'src/parsing.h')
-rw-r--r-- | src/parsing.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parsing.h b/src/parsing.h index f5df77bad..fb9e3547c 100644 --- a/src/parsing.h +++ b/src/parsing.h @@ -127,7 +127,7 @@ inline Expression* parseConst(cashew::IString s, WasmType type, MixedArena& allo ret->value = Literal(negative ? -temp : temp); } else { std::istringstream istr(str); - int32_t temp; + uint32_t temp; istr >> temp; ret->value = Literal(temp); } @@ -143,7 +143,7 @@ inline Expression* parseConst(cashew::IString s, WasmType type, MixedArena& allo ret->value = Literal(negative ? -temp : temp); } else { std::istringstream istr(str); - int64_t temp; + uint64_t temp; istr >> temp; ret->value = Literal(temp); } |