diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-03-22 03:38:11 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-03-22 03:38:11 +0100 |
commit | eaa9f2518e12079bc8ca1313f605553a4bcad361 (patch) | |
tree | caae91a87b6b541a335126f1d1bcbcb20b52d58b | |
parent | 6974ae10b3942eab5cda4b64606af29127d63a0f (diff) |
[COVERITY] spline-widget: fix possible fpu division by zero
-rw-r--r-- | spline-widget/spline.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spline-widget/spline.cpp b/spline-widget/spline.cpp index 8d7159ee..1f457715 100644 --- a/spline-widget/spline.cpp +++ b/spline-widget/spline.cpp @@ -204,7 +204,7 @@ void spline::update_interp_data() { const double x = points[0].x(); const double y = points[0].y(); - const int max = clamp(int(x * precision(points)), 0, value_count-1); + const int max = clamp(int(x * precision(points)), 1, value_count-1); for (int k = 0; k <= max; k++) { if (k < value_count) |