aboutsummaryrefslogtreecommitdiff
path: root/todo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'todo.cpp')
-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;