Skip to content

Commit 3b43b71

Browse files
authored
Fix splines becoming linear when duplicated. (#426)
When used in `spline { SPLINE_IDENTIFIER ... }` without explicitly specifying spline type again, the new copy would get demoted to `linear_spline` (see newsgroup post <[email protected]>, 2021-07-15, povray.beta-test, "spline in, out array bug").
1 parent ec53583 commit 3b43b71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/parser/parser_expressions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
// Unit header file must be the first file included within POV-Ray *.cpp files (pulls in config)
3939
#include "parser/parser.h"
4040

41-
// C++ variants of C standard header files
41+
// C++ variants of standard C header files
4242
#include <cctype>
4343
#include <cstdlib>
4444

@@ -3728,7 +3728,7 @@ GenericSpline *Parser::Parse_Spline()
37283728
if (!New)
37293729
{
37303730
if (Old)
3731-
New = new LinearSpline(*Old);
3731+
New = Old->Clone();
37323732
else
37333733
New = new LinearSpline();
37343734
}

0 commit comments

Comments
 (0)