From 5e47313af85b43f8dd54406f0f89b36b84b73319 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Fri, 13 Aug 2021 21:44:07 +0200 Subject: [PATCH] fixed: when incrementing space tables iterators in [for] statements we should invalidate indices for nested tables --- src/generator.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/generator.h b/src/generator.h index 230b7c9..4c56209 100644 --- a/src/generator.h +++ b/src/generator.h @@ -1447,6 +1447,7 @@ void Generator::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()); }