diff --git a/ChangeLog b/ChangeLog index fdc824bd1..a4915eed0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ 1.8.4 () + Fixed bug that caused wait: dates to not be properly rendered in a readable and preferred format with the "edit" command. + + Fixed bug that caused a hang on cygwin, when a task with multiple + annotations was edited (thanks to Joe Pulliam). ------ old releases ------------------------------ diff --git a/src/Task.cpp b/src/Task.cpp index 68bf75766..2d184cfde 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -441,10 +441,14 @@ void Task::addAnnotation (const std::string& description) void Task::removeAnnotations () { // Erase old annotations. - Record::iterator i; - for (i = this->begin (); i != this->end (); ++i) + Record::iterator i = this->begin (); + while (i != this->end ()) + { if (i->first.substr (0, 11) == "annotation_") // No i18n - this->erase (i); + this->erase (i++); + else + i++; + } } ////////////////////////////////////////////////////////////////////////////////