diff options
Diffstat (limited to '010vm.cc')
-rw-r--r-- | 010vm.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/010vm.cc b/010vm.cc index cf46bc65..a4c5eb54 100644 --- a/010vm.cc +++ b/010vm.cc @@ -269,14 +269,17 @@ string_tree* parse_property_list(istream& in) { } type_tree* new_type_tree(const string_tree* properties) { +//? dump_property(properties, cerr); cerr << '\n'; if (!properties) return NULL; type_tree* result = new type_tree(0); if (!properties->value.empty()) { const string& type_name = properties->value; if (contains_key(Type_ordinal, type_name)) result->value = get(Type_ordinal, type_name); + else if (is_integer(type_name)) // sometimes types will contain non-type tags, like numbers for the size of an array + result->value = 0; else - result->value = -1; + result->value = -1; // should never happen; will trigger errors later } result->left = new_type_tree(properties->left); result->right = new_type_tree(properties->right); |