Bytecode: fix bug introduced in previous commit

map::at() does bound checking, and throws an exception if out-of-range,
contrary to [] operator which returns a new element.
time-shift
Sébastien Villemot 2021-02-03 19:51:56 +01:00
parent 4893f0e82c
commit 4a1dbc5ca4
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 2 additions and 2 deletions

View File

@ -870,8 +870,8 @@ Interpreter::extended_path(const string &file_name, const string &bin_basename,
it_code = Init_Code;
vector_table_conditional_local.clear();
if (table_conditional_global.size())
vector_table_conditional_local = table_conditional_global.at(t);
if (auto it = table_conditional_global.find(t); it != table_conditional_global.end())
vector_table_conditional_local = it->second;
if (t < nb_periods)
MainLoop(bin_basename, code, evaluate, block, false, true, sconstrained_extended_path, vector_table_conditional_local);
else