From 6211eee2626b8ebc0b2a3364798c2c0be5fcf57c Mon Sep 17 00:00:00 2001 From: Christoph Lipka Date: Sat, 27 Feb 2016 17:21:19 +0100 Subject: [PATCH] Fixed bug in splines even more. --- source/base/version.h | 2 +- source/core/math/spline.cpp | 6 +++--- unix/VERSION | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/base/version.h b/source/base/version.h index 2ee5b3e0a..d5fa260f5 100644 --- a/source/base/version.h +++ b/source/base/version.h @@ -45,7 +45,7 @@ #define OFFICIAL_VERSION_STRING "3.7.1" #define OFFICIAL_VERSION_NUMBER 371 -#define POV_RAY_PRERELEASE "alpha.8498353" +#define POV_RAY_PRERELEASE "alpha.8498421" #if (POV_RAY_IS_AUTOBUILD == 1) && ((POV_RAY_IS_OFFICIAL == 1) || (POV_RAY_IS_SEMI_OFFICIAL == 1)) #ifdef POV_RAY_PRERELEASE diff --git a/source/core/math/spline.cpp b/source/core/math/spline.cpp index 410daed2c..a977c3537 100644 --- a/source/core/math/spline.cpp +++ b/source/core/math/spline.cpp @@ -675,13 +675,13 @@ void Insert_Spline_Entry(GenericSpline * sp, DBL p, const EXPRESS& v) // If p matches the _last_ spline entry, `findt()` is implemented to return `sp->SplineEntries.size()` // instead of the index of the matching entry; this has some benefits in the other places `findt()` is used, // but requires the following workaround here. - if (i == sp->SplineEntries.size() && (sp->SplineEntries[i-1].par == p)) + if (i < sp->SplineEntries.size()) + replace = (sp->SplineEntries[i].par == p); + else if (sp->SplineEntries[i-1].par == p) { --i; replace = true; } - else - replace = (sp->SplineEntries[i].par == p); } if(replace) { diff --git a/unix/VERSION b/unix/VERSION index e94ac5a5e..ab52b10f4 100644 --- a/unix/VERSION +++ b/unix/VERSION @@ -1 +1 @@ -3.7.1-alpha.8498353 +3.7.1-alpha.8498421