POV-Ray : Newsgroups : povray.beta-test : splinefollow : Re: splinefollow Server Time
6 May 2024 00:35:20 EDT (-0400)
  Re: splinefollow  
From: Le Forgeron
Date: 27 Feb 2016 10:45:22
Message: <56d1c492@news.povray.org>
> Please try the source code now available at
> https://github.com/POV-Ray/povray (still waiting for the Windows builds
> to complete, so it's not available in the Releases section yet).
> 
Gitid: 832d5713976c6f883c8242035b9694c262b07fc5

still crashing... do not try to be smart, if spline is not empty, and i
is size, but last entry is not the new index, you take the else
branch... and access out of bound to compute replace.

+    if (!sp->SplineEntries.empty())
+    {
+        if (i == sp->SplineEntries.size() &&
(sp->SplineEntries[i-1].par == p))
+        {
+            --i;
+            replace = true;
+        }
+        else
+            replace = (sp->SplineEntries[i].par == p);
+    }

I unrolled the code... there was a reason.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.