diff --git a/src/Exclusion.cpp b/src/Exclusion.cpp index b220edf5..fbe1d1c6 100644 --- a/src/Exclusion.cpp +++ b/src/Exclusion.cpp @@ -120,7 +120,7 @@ std::vector Exclusion::ranges (const Range& range) const else if ((dayOfWeek = Datetime::dayOfWeek (_tokens[1])) != -1) { Datetime start (range.start.year (), range.start.month (), range.start.day (), 0, 0, 0); - while (start < range.end) + while (start <= range.end) { if (start.dayOfWeek () == dayOfWeek) { diff --git a/src/data.cpp b/src/data.cpp index adcf101b..f4889dbb 100644 --- a/src/data.cpp +++ b/src/data.cpp @@ -295,7 +295,7 @@ std::vector getAllExclusions ( results = subtractRanges (results, daysOn); // Expand all exclusions that are not 'exc day ...' into excluded ranges that - // overlage with range. + // overlap with range. std::vector exclusionRanges; for (auto& exclusion : exclusions) if (exclusion.tokens ()[1] != "day") @@ -459,6 +459,7 @@ std::vector merge ( } else { + sorted[cursor] = sorted[i]; ++cursor; } }