fix variable_info.cpp
variable_as_array_h::operator() expects the range to be passed as a pair (startindex, endindex). We accidentally passed the range as (startindex, size) instead. Shadowm reported bugs related to global variables but most likely this can also lead to segfaults in other situations (some uses of [set_variables]).
This commit is contained in:
parent
d0623f16da
commit
c64a1925df
1 changed files with 1 additions and 1 deletions
|
@ -395,7 +395,7 @@ namespace {
|
|||
}
|
||||
/// variable_as_array_h only uses the template argument (vit_throw_if_not_existent here)
|
||||
/// to determine constness which is always false here
|
||||
return variable_as_array_h<vit_throw_if_not_existent>()(child, key, startindex, datasource_.size());
|
||||
return variable_as_array_h<vit_throw_if_not_existent>()(child, key, startindex, startindex + datasource_.size());
|
||||
}
|
||||
private:
|
||||
std::vector<config>& datasource_;
|
||||
|
|
Loading…
Add table
Reference in a new issue