aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/runtime.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime.js b/src/runtime.js
index 8ba5d08d..cd3afb4b 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -250,7 +250,7 @@ var Runtime = {
prev = curr;
return curr;
});
- if (type.name_[0] === '[') {
+ if (type.name_ && type.name_[0] === '[') {
// arrays have 2 elements, so we get the proper difference. then we scale here. that way we avoid
// allocating a potentially huge array for [999999 x i8] etc.
type.flatSize = parseInt(type.name_.substr(1))*type.flatSize/2;