POV-Ray : Newsgroups : povray.beta-test : splinefollow : Re: splinefollow Server Time
6 May 2024 06:00:29 EDT (-0400)
  Re: splinefollow  
From: ThH
Date: 27 Feb 2016 11:01:44
Message: <56d1c868@news.povray.org>
Am 27.02.2016 um 16:45 schrieb Le_Forgeron:

> still crashing...

Same here.

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.