Commit 7f59b807 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 057908ba
......@@ -371,7 +371,8 @@ int
SymbolTable::searchAuxiliaryVars(int orig_symb_id, int orig_lead_lag) const
{
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 -1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment