From abc4f9c7156e786b97c637a4f70f8e97da3b7fee Mon Sep 17 00:00:00 2001 From: ache Date: Mon, 2 Apr 2018 11:27:44 +0200 Subject: Fix bug correspondance move --- todo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/todo.cpp b/todo.cpp index 90c473b..387a296 100755 --- a/todo.cpp +++ b/todo.cpp @@ -425,9 +425,9 @@ int main(int argc, char *argv[]) { break; // for the moment } it->str = " " + newDesc; - if( correspondIndex < listTodo.size() && correspondIndex >= 0 ) { - it->priorite = listTodo[correspondIndex].priorite; - it->etat = listTodo[correspondIndex].etat; + if( correspondIndex <= listTodo.size() && correspondIndex > 0 ) { + it->priorite = listTodo[correspondIndex-1].priorite; + it->etat = listTodo[correspondIndex-1].etat; } if( it != end(listTodo) ) ++it; -- cgit v1.2.3