WSL/SLF GitLab Repository

Commit 9b4e7d06 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Fixed a bug in DAILY_AVG that made it crash on some datasets

parent d239580c
......@@ -181,8 +181,10 @@ size_t ResamplingAlgorithms::getDailyValue(const std::vector<MeteoData>& vecM, c
if (vecM[pos].date>=intervalStart) break;
if (vecM[pos].date>intervalEnd) {
for (; pos-- >0;)
for (size_t ii = pos; ii-- >0; ) {
pos=ii; //because ii gets corrupted at the final iteration if going all the way down
if (vecM[pos].date<=intervalEnd) break;
//look for daily sum before the current point
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment