diff options
author | ache <ache@ache.one> | 2018-04-02 11:27:44 +0200 |
---|---|---|
committer | ache <ache@ache.one> | 2018-04-02 11:27:44 +0200 |
commit | abc4f9c7156e786b97c637a4f70f8e97da3b7fee (patch) | |
tree | 32fcd1a01318ae03d6af18bb68b38084b4aa47d0 | |
parent | Debug and error correction todo move (diff) |
Fix bug correspondance move
-rwxr-xr-x | todo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |