From b30604fffe1474e6946cfcf2e3eede03fd8d2b0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Thu, 6 Jan 2011 20:23:13 +0100 Subject: [PATCH] Bug on GenerateMonth with different years --- src/controller/KissCount.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controller/KissCount.cpp b/src/controller/KissCount.cpp index 18203a5..4113bc4 100644 --- a/src/controller/KissCount.cpp +++ b/src/controller/KissCount.cpp @@ -296,8 +296,8 @@ void KissCount::GenerateMonth(int monthFrom, int yearFrom, int monthTo, int year } // Re Generate parents - for(it = (*_user->_operations[yearFrom])[monthTo].begin(); - it != (*_user->_operations[yearFrom])[monthTo].end(); + for(it = (*_user->_operations[yearTo])[monthTo].begin(); + it != (*_user->_operations[yearTo])[monthTo].end(); it++) { if (it->parent.Length()) @@ -305,8 +305,8 @@ void KissCount::GenerateMonth(int monthFrom, int yearFrom, int monthTo, int year it->parent = meta[it->parent]; UpdateOperation(*it); - for(it2 = (*_user->_operations[yearFrom])[monthTo].begin(); - it2 != (*_user->_operations[yearFrom])[monthTo].end(); + for(it2 = (*_user->_operations[yearTo])[monthTo].begin(); + it2 != (*_user->_operations[yearTo])[monthTo].end(); it2++) if (it2->id == it->parent) {