From 5ab69e71cbfcf5ad4933a4ac95757b42622db1d6 Mon Sep 17 00:00:00 2001
From: Franck Dary <franck.dary@lis-lab.fr>
Date: Thu, 13 Feb 2020 18:39:27 +0100
Subject: [PATCH] Fixed Config::hasStack : it was not working with index 0

---
 reading_machine/src/Config.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/reading_machine/src/Config.cpp b/reading_machine/src/Config.cpp
index faeb04f..fe65a06 100644
--- a/reading_machine/src/Config.cpp
+++ b/reading_machine/src/Config.cpp
@@ -393,7 +393,7 @@ bool Config::hasHistory(int relativeIndex) const
 
 bool Config::hasStack(int relativeIndex) const
 {
-  return relativeIndex > 0 && relativeIndex < (int)stack.size();
+  return relativeIndex >= 0 && relativeIndex < (int)stack.size();
 }
 
 Config::String Config::getState() const
-- 
GitLab