aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-01 11:12:27 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-01 11:12:27 -0800
commit98cf94285417ca6d9fcd673291ce2794b4e25776 (patch)
tree059fb6ffb5f4ed9d0c43cc1230f244444f22e080
parent747bd9fdb7a411108b4bccc06fe001cc73e9ca54 (diff)
parent287189e104fcc777635fec505a1c6f5d0c75dd21 (diff)
Merge pull request #1870 from inolen/structinfo_fix
fix for structures generated by manually calling generateStructInfo
-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;