mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-10-11 16:58:27 +03:00
MainEXFile: Fix set_indices/map_handles for EX_LIST
items->value was always indexing the first item; use items[i].value to properly assign IDs and map handles for all list items.
This commit is contained in:
@@ -51,7 +51,7 @@ static int set_indices(struct ex_value *val, int id)
|
||||
break;
|
||||
case EX_LIST:
|
||||
for (unsigned i = 0; i < val->list->nr_items; i++) {
|
||||
id = set_indices(&val->list->items->value, id);
|
||||
id = set_indices(&val->list->items[i].value, id);
|
||||
}
|
||||
break;
|
||||
case EX_TREE:
|
||||
@@ -86,7 +86,7 @@ static void map_handles(struct ex_value *val)
|
||||
break;
|
||||
case EX_LIST:
|
||||
for (unsigned i = 0; i < val->list->nr_items; i++) {
|
||||
map_handles(&val->list->items->value);
|
||||
map_handles(&val->list->items[i].value);
|
||||
}
|
||||
break;
|
||||
case EX_TREE:
|
||||
|
||||
Reference in New Issue
Block a user