diff options
-rw-r--r-- | spline/spline.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spline/spline.cpp b/spline/spline.cpp index d6bdf2c1..92e03ade 100644 --- a/spline/spline.cpp +++ b/spline/spline.cpp @@ -165,7 +165,7 @@ void spline::update_interp_data() const const QPointF& pt = list[0]; const double x = pt.x(); const double y = pt.y(); - const unsigned max = std::clamp((unsigned)iround(x * c), 0u, value_count-1); + const unsigned max = std::clamp((unsigned)iround(x * c), 1u, value_count-1); for (unsigned k = 0; k <= max; k++) data[k] = float(y * k / max); // no need for bresenham |