aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2018-04-02 11:27:44 +0200
committerache <ache@ache.one>2018-04-02 11:27:44 +0200
commitabc4f9c7156e786b97c637a4f70f8e97da3b7fee (patch)
tree32fcd1a01318ae03d6af18bb68b38084b4aa47d0
parentDebug and error correction todo move (diff)
Fix bug correspondance move
-rwxr-xr-xtodo.cpp6
1 files 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;