fixed: when incrementing space tables iterators in [for] statements we should invalidate indices for nested tables

This commit is contained in:
Tomasz Sowa 2021-08-13 21:44:07 +02:00
parent 44407c2a4b
commit 5e47313af8
1 changed files with 1 additions and 0 deletions

View File

@ -1447,6 +1447,7 @@ void Generator<StreamType, is_pikotools_stream, is_autoescape_stream>::CallSpace
{
// we are in [for...]statement, increment iterator and check the range
space_wrapper.increment_iterator(model_wrapper_space_table_index, table->size());
space_wrapper.invalidate_iterators(model_wrapper_space_table_index + 1);
size_t iterator_value = space_wrapper.get_space_iterator_value(model_wrapper_space_table_index);
last_res = (iterator_value < table->size());
}