Skip to content

Commit 0d9bb24

Browse files
committed
Check isBasic before getBasic in validator
1 parent 0e2eb12 commit 0d9bb24

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/wasm/wasm-validator.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ struct ValidationInfo {
198198
Expression* curr,
199199
const char* text,
200200
Function* func = nullptr) {
201+
if (!ty.isBasic()) {
202+
fail(std::string(text) + " (not basic)", curr, func);
203+
return;
204+
}
201205
switch (ty.getBasic()) {
202206
case Type::i32:
203207
case Type::i64:

0 commit comments

Comments
 (0)