Bugfix: keeping old month's date when setting up new project list from last one

This commit is contained in:
Patrick Lipka 2022-05-02 13:03:05 +02:00
parent 3a3a184b5e
commit d5919aa63c
2 changed files with 8 additions and 4 deletions

View File

@ -151,9 +151,13 @@ void ProjectList::load(std::string file_name, bool ignore_worktimes){
inf.read((char*) &month_len,sizeof(size_t));
char *month_tmp = new char[month_len+1];
inf.read(month_tmp,month_len);
if(!ignore_worktimes){
month_tmp[month_len] = '\0';
month = month_tmp;
delete [] month_tmp;
}else{
month=get_date();
}
}
inf.read((char*) &num_projects,sizeof(int));

View File

@ -3,7 +3,7 @@
#include <string>
#define TT_VERSION 1.2.0
#define TT_VERSION 1.2.1
#define TT_IO_VERSION 120
// global variables: