Skip to content
Snippets Groups Projects
Commit 855fdf8c authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Preprocessor: fix possible bug in histval (need to limit search of aux vars to...

Preprocessor: fix possible bug in histval (need to limit search of aux vars to aux vars for lagged vars, otherwise we could have a wrong match with some other kind)
parent a7fc3361
No related branches found
No related tags found
No related merge requests found
...@@ -371,7 +371,8 @@ int ...@@ -371,7 +371,8 @@ int
SymbolTable::searchAuxiliaryVars(int orig_symb_id, int orig_lead_lag) const SymbolTable::searchAuxiliaryVars(int orig_symb_id, int orig_lead_lag) const
{ {
for (int i=0; i < aux_vars.size();++i) for (int i=0; i < aux_vars.size();++i)
if ((aux_vars[i].get_orig_symb_id() == orig_symb_id) && (aux_vars[i].get_orig_lead_lag() == orig_lead_lag)) if ((aux_vars[i].get_type() == avEndoLag || aux_vars[i].get_type() == avExoLag)
&& aux_vars[i].get_orig_symb_id() == orig_symb_id && aux_vars[i].get_orig_lead_lag() == orig_lead_lag)
return aux_vars[i].get_symb_id(); return aux_vars[i].get_symb_id();
return -1; return -1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment