Skip to content

Commit

Permalink
Fixed bug in splines even more.
Browse files Browse the repository at this point in the history
  • Loading branch information
c-lipka committed Feb 27, 2016
1 parent 832d571 commit 6211eee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion source/base/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions source/core/math/spline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion unix/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.1-alpha.8498353
3.7.1-alpha.8498421

0 comments on commit 6211eee

Please sign in to comment.