mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
profilepgrahics.cpp: fix preceding limit check
ProfileGraphicsView::plot_depth_profile(): The iterator limit check (i < 7) should precede the indexing (increments[i]). Reported by the program cppcheck. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f09afad5a0
commit
fbcad20072
1 changed files with 1 additions and 1 deletions
|
@ -1098,7 +1098,7 @@ void ProfileGraphicsView::plot_depth_profile()
|
|||
* we double the interval if this still doesn't get us to 12 or fewer
|
||||
* time markers */
|
||||
i = 0;
|
||||
while (maxtime / increments[i] > 12 && i < 7)
|
||||
while (i < 7 && maxtime / increments[i] > 12)
|
||||
i++;
|
||||
incr = increments[i];
|
||||
while (maxtime / incr > 12)
|
||||
|
|
Loading…
Reference in a new issue