diff --git a/src/recur.cpp b/src/recur.cpp index 3181bed3d..f82e7600a 100644 --- a/src/recur.cpp +++ b/src/recur.cpp @@ -251,7 +251,7 @@ Datetime getNextRecurrence (Datetime& current, std::string& period) Lexer::isAllDigits (period.substr (1, period.length () - 2)) && period[period.length () - 1] == 'M') { - int increment = strtol (period.substr (0, period.length () - 1).c_str (), nullptr, 10); + int increment = strtol (period.substr (1, period.length () - 2).c_str (), nullptr, 10); m += increment; while (m > 12)