From eac4e36f67e761365d37d9370528f00b4b2d74ab Mon Sep 17 00:00:00 2001
From: Franck Dary <franck.dary@lis-lab.fr>
Date: Tue, 25 Feb 2020 20:55:00 +0100
Subject: [PATCH] Fixed printForDebug : don't call stoi on empty cell

---
 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 52129ed..0fc17c6 100644
--- a/reading_machine/src/Config.cpp
+++ b/reading_machine/src/Config.cpp
@@ -146,7 +146,7 @@ void Config::printForDebug(FILE * dest) const
       std::string toPrintCol = colContent;
       try
       {
-        if (getColName(i) == headColName && toPrintCol != "_")
+        if (getColName(i) == headColName && toPrintCol != "_" && !toPrintCol.empty())
           if (toPrintCol != "0")
             toPrintCol = getAsFeature(idColName, std::stoi(toPrintCol));
       } catch(std::exception & e) {util::myThrow(fmt::format("toPrintCol='{}' {}", toPrintCol, e.what()));}
-- 
GitLab