aboutsummaryrefslogtreecommitdiff
path: root/src/parseTools.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-07-29 14:54:21 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-07-29 14:59:16 -0700
commit61526bc8b6eca8950e34616fc9cad2212c18abe6 (patch)
treedd559f9b17465732b4e870d02b450b81a88f03bd /src/parseTools.js
parent82cafff17306df64c31224c1e343458a6096ff36 (diff)
accept [0 x ..] in the middle of structures, odd as it might seem, this is valid c
Diffstat (limited to 'src/parseTools.js')
-rw-r--r--src/parseTools.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index 72166592..b7d3ea91 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -970,10 +970,9 @@ 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;
+ // this is [0 x something], which does nothing
+ // XXX this happens in java_nbody... assert(i === typeData.fields.length-1);
+ continue;
}
add(Types.types[type]);
}