aboutsummaryrefslogtreecommitdiff
path: root/src/parseTools.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-07-23 20:26:44 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-07-23 20:26:44 -0700
commit099f970ee705dd2e45cc59388ad3642bf93fea7d (patch)
tree401b1c00c9f33e7f3f1f48cf2edb1c05051d6e61 /src/parseTools.js
parenteb9e6cb27251d56adbe03eceeee595b5e3ce93f7 (diff)
properly handle generation of instances of structures ending in [0 x ..]
Diffstat (limited to 'src/parseTools.js')
-rw-r--r--src/parseTools.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index 3f7bd421..72166592 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -969,6 +969,12 @@ function generateStructTypes(type) {
}
ret[index++] = type;
} else {
+ if (Runtime.isStructType(type) && type[1] === '0') {
+ // this is [0 x something]. When inside another structure like here, it must be at the end,
+ // and it does nothing
+ assert(i === typeData.fields.length-1);
+ return;
+ }
add(Types.types[type]);
}
var more = (i+1 < typeData.fields.length ? typeData.flatIndexes[i+1] : typeData.flatSize) - (index - start);