Skip to content

Commit 6211eee

Browse files
committed
Fixed bug in splines even more.
1 parent 832d571 commit 6211eee

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

source/base/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#define OFFICIAL_VERSION_STRING "3.7.1"
4646
#define OFFICIAL_VERSION_NUMBER 371
4747

48-
#define POV_RAY_PRERELEASE "alpha.8498353"
48+
#define POV_RAY_PRERELEASE "alpha.8498421"
4949

5050
#if (POV_RAY_IS_AUTOBUILD == 1) && ((POV_RAY_IS_OFFICIAL == 1) || (POV_RAY_IS_SEMI_OFFICIAL == 1))
5151
#ifdef POV_RAY_PRERELEASE

source/core/math/spline.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -675,13 +675,13 @@ void Insert_Spline_Entry(GenericSpline * sp, DBL p, const EXPRESS& v)
675675
// If p matches the _last_ spline entry, `findt()` is implemented to return `sp->SplineEntries.size()`
676676
// instead of the index of the matching entry; this has some benefits in the other places `findt()` is used,
677677
// but requires the following workaround here.
678-
if (i == sp->SplineEntries.size() && (sp->SplineEntries[i-1].par == p))
678+
if (i < sp->SplineEntries.size())
679+
replace = (sp->SplineEntries[i].par == p);
680+
else if (sp->SplineEntries[i-1].par == p)
679681
{
680682
--i;
681683
replace = true;
682684
}
683-
else
684-
replace = (sp->SplineEntries[i].par == p);
685685
}
686686
if(replace)
687687
{

unix/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.7.1-alpha.8498353
1+
3.7.1-alpha.8498421

0 commit comments

Comments
 (0)