From f7a367d7b10f60e46604b172970005cebce1342d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Wed, 7 Jul 2021 18:35:15 +0200
Subject: [PATCH] =?UTF-8?q?=E2=80=9Cvar=5Fmodel=E2=80=9D=20statement:=20ma?=
 =?UTF-8?q?ke=20=E2=80=9Ceqtags=E2=80=9D=20option=20mandatory?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/ParsingDriver.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/ParsingDriver.cc b/src/ParsingDriver.cc
index 9577a785..77302c81 100644
--- a/src/ParsingDriver.cc
+++ b/src/ParsingDriver.cc
@@ -1386,10 +1386,10 @@ ParsingDriver::var_model()
     error("You must pass the model_name option to the var_model statement.");
   auto name = its->second;
 
-  vector<string> eqtags;
   auto itvs = options_list.vector_str_options.find("var.eqtags");
-  if (itvs != options_list.vector_str_options.end())
-    eqtags = itvs->second;
+  if (itvs == options_list.vector_str_options.end())
+    error("You must pass the eqtags option to the var_model statement.");
+  auto eqtags = itvs->second;
 
   mod_file->var_model_table.addVarModel(name, eqtags);
   options_list.clear();
-- 
GitLab