summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai (kripken) <alonzakai@gmail.com>2017-05-29 20:08:48 -0700
committerAlon Zakai <alonzakai@gmail.com>2017-06-01 13:17:44 -0700
commit4cb970fa052d5f2f5d29de60f612dc1e22fb81ee (patch)
tree1b27a940550e3b13d23ae98a42559195179c5c18
parentb32e1a966681e5d480d2beb81310a4c8bf65ecdb (diff)
downloadbinaryen-4cb970fa052d5f2f5d29de60f612dc1e22fb81ee.tar.gz
binaryen-4cb970fa052d5f2f5d29de60f612dc1e22fb81ee.tar.bz2
binaryen-4cb970fa052d5f2f5d29de60f612dc1e22fb81ee.zip
trap on bad result types in shell-interface callTable
-rw-r--r--src/shell-interface.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shell-interface.h b/src/shell-interface.h
index 076787c9b..ef92f40cd 100644
--- a/src/shell-interface.h
+++ b/src/shell-interface.h
@@ -156,6 +156,9 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface {
trap("callIndirect: bad argument type");
}
}
+ if (func->result != result) {
+ trap("callIndirect: bad result type");
+ }
return instance.callFunctionInternal(func->name, arguments);
}