aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Pesch <inolen@gmail.com>2013-11-28 00:19:27 -0800
committerAnthony Pesch <inolen@gmail.com>2013-11-28 00:19:27 -0800
commit287189e104fcc777635fec505a1c6f5d0c75dd21 (patch)
treeded8668eb7cb42f7374858db19ef526c1839cbfd
parent17f8a4b6286b789a2962cd9016923d8aa8d02d85 (diff)
- 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 dedaf5ea..135e8fba 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -247,7 +247,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;