From 90c90ca85d5f065a7935748133434a8828af8faf Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan@dynare.org> Date: Mon, 28 May 2018 15:55:01 +0200 Subject: [PATCH] pac: undiff: fix bug in erroneous conditional --- src/DynamicModel.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DynamicModel.cc b/src/DynamicModel.cc index 31254480..f43021d7 100644 --- a/src/DynamicModel.cc +++ b/src/DynamicModel.cc @@ -3506,9 +3506,9 @@ DynamicModel::getUndiffLHSForPac(vector<int> &lhs, vector<expr_t> &lhs_expr_t, v exit(EXIT_FAILURE); } - if (diff.at(eqnumber[i]) != true) + if (diff.at(i) != true) { - cerr << "ERROR: the variable on the LHS of equation #" << eqn << " (VAR equation #" << eqnumber[i] + cerr << "ERROR: the variable on the LHS of equation #" << eqn << " (VAR equation #" << i << " with equation tag '" << eqtag << "') does not have the diff operator applied to it yet you are trying to undiff it." << endl; exit(EXIT_FAILURE); -- GitLab