aboutsummaryrefslogtreecommitdiff
path: root/src/runtime.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime.js')
-rw-r--r--src/runtime.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime.js b/src/runtime.js
index 06638fa3..5b09a16b 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -179,6 +179,7 @@ Runtime = {
offset = offset || 0;
type = typeof Types === 'undefined' ? Runtime.typeInfo[typeName] : Types.types[typeName];
if (!type) return null;
+ if (!struct) struct = Types.structMetadata[typeName.replace(/.*\./, '')];
assert(type.fields.length === struct.length, 'Number of named fields must match the type for ' + typeName);
alignment = type.flatIndexes;
} else {