From dea58be55872eb7d78f7f4fed39f7eb5bcb39b64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Mon, 17 Feb 2014 17:52:37 +0100 Subject: [PATCH] Fix size of M_.endo_histval. Should fix crashes on models with leads/lags of more than one on exogenous. Closes #617 --- NumericalInitialization.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NumericalInitialization.cc b/NumericalInitialization.cc index 4e28a492..4e2fc618 100644 --- a/NumericalInitialization.cc +++ b/NumericalInitialization.cc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2013 Dynare Team + * Copyright (C) 2003-2014 Dynare Team * * This file is part of Dynare. * @@ -269,7 +269,7 @@ HistValStatement::writeOutput(ostream &output, const string &basename) const output << "%" << endl << "% HISTVAL instructions" << endl << "%" << endl - << "M_.endo_histval = zeros(M_.endo_nbr,M_.maximum_lag);" << endl; + << "M_.endo_histval = zeros(M_.endo_nbr,M_.maximum_endo_lag);" << endl; for (hist_values_t::const_iterator it = hist_values.begin(); it != hist_values.end(); it++) @@ -305,7 +305,7 @@ HistValStatement::writeOutput(ostream &output, const string &basename) const int tsid = symbol_table.getTypeSpecificID(symb_id) + 1; if (type == eEndogenous) - output << "M_.endo_histval( " << tsid << ", M_.maximum_lag + " << lag << ") = "; + output << "M_.endo_histval( " << tsid << ", M_.maximum_endo_lag + " << lag << ") = "; else if (type == eExogenous) output << "oo_.exo_simul( M_.maximum_lag + " << lag << ", " << tsid << " ) = "; else if (type != eExogenousDet)