WSL/SLF GitLab Repository
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
snow-models
meteoio
Commits
9b4e7d06
Commit
9b4e7d06
authored
Apr 10, 2015
by
Mathias Bavay
Browse files
Fixed a bug in DAILY_AVG that made it crash on some datasets
parent
d239580c
Changes
1
Hide whitespace changes
Inline
Side-by-side
meteoio/ResamplingAlgorithms.cc
View file @
9b4e7d06
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment