Skip to content

Commit cbdf629

Browse files
committed
fix parsing of large ints
1 parent bf7ca15 commit cbdf629

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/parsing.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ inline Expression* parseConst(cashew::IString s, WasmType type, MixedArena& allo
127127
ret->value = Literal(negative ? -temp : temp);
128128
} else {
129129
std::istringstream istr(str);
130-
int32_t temp;
130+
uint32_t temp;
131131
istr >> temp;
132132
ret->value = Literal(temp);
133133
}
@@ -143,7 +143,7 @@ inline Expression* parseConst(cashew::IString s, WasmType type, MixedArena& allo
143143
ret->value = Literal(negative ? -temp : temp);
144144
} else {
145145
std::istringstream istr(str);
146-
int64_t temp;
146+
uint64_t temp;
147147
istr >> temp;
148148
ret->value = Literal(temp);
149149
}

0 commit comments

Comments
 (0)