Skip to content

Commit 4cb970f

Browse files
committed
trap on bad result types in shell-interface callTable
1 parent b32e1a9 commit 4cb970f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/shell-interface.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface {
156156
trap("callIndirect: bad argument type");
157157
}
158158
}
159+
if (func->result != result) {
160+
trap("callIndirect: bad result type");
161+
}
159162
return instance.callFunctionInternal(func->name, arguments);
160163
}
161164

0 commit comments

Comments
 (0)