From 8388f5a5fcd6aaaf556cd82a1924b82dad8e3ae9 Mon Sep 17 00:00:00 2001
From: Romain BERNARD <romain.bernard@uca.fr>
Date: Thu, 29 Feb 2024 12:58:10 +0100
Subject: [PATCH] send preceding node if it's 0

---
 src/instance/graph/LineStop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/instance/graph/LineStop.h b/src/instance/graph/LineStop.h
index 413a455..afcd980 100644
--- a/src/instance/graph/LineStop.h
+++ b/src/instance/graph/LineStop.h
@@ -43,7 +43,7 @@ public:
      */
     [[nodiscard]] int getPrecedingNodeIndex() const
     {
-        if(_stopIndex - 1 > 0)
+        if(_stopIndex - 1 >= 0)
             return _lineRef.getNode(_stopIndex - 1);
         else
             return -1;
-- 
GitLab