From bdfe4f42492419e8ea2547eda14a39b1f88b37fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Tue, 12 Aug 2014 18:53:55 +0200
Subject: [PATCH] Fix STEADY_STATE operator for model local variables.

Thanks to Tom Holden for spotting the bug.
---
 preprocessor/ExprNode.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/preprocessor/ExprNode.cc b/preprocessor/ExprNode.cc
index d7f7bd4dc0..d4121b7292 100644
--- a/preprocessor/ExprNode.cc
+++ b/preprocessor/ExprNode.cc
@@ -621,7 +621,9 @@ VariableNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
       break;
 
     case eModelLocalVariable:
-      if (output_type == oMatlabDynamicModelSparse || output_type == oMatlabStaticModelSparse)
+      if (output_type == oMatlabDynamicModelSparse || output_type == oMatlabStaticModelSparse
+          || output_type == oMatlabDynamicSteadyStateOperator || output_type == oMatlabDynamicSparseSteadyStateOperator
+          || output_type == oCDynamicSteadyStateOperator)
         {
           output << "(";
           datatree.local_variables_table[symb_id]->writeOutput(output, output_type, temporary_terms, tef_terms);
-- 
GitLab