POV-Ray : Newsgroups : povray.programming : Bug report and solution (2nd trial) : Re: Bug report and solution (2nd trial) Server Time
29 Jul 2024 06:25:52 EDT (-0400)
  Re: Bug report and solution (2nd trial)  
From: Nathan Kopp
Date: 17 Jul 1998 01:27:02
Message: <35AEE18E.FD0B375E@ltu.edu>
Thomas Willhalm wrote:
> [clip]
> This happens, because the length of the vector is not set to two
> while parsing the vector. More precisely, in express.c in function
> Parse_Num_Factor line 579 the command
>         *Terms=2;
> should be added.

I have verified this bug and the fix.  However, in my code, it's more
like around line 611.  The section of code looks like this:
---------------------------
/* This case parses a 2, 3, 4, or 5 term vector.  First parse 2 terms.
   Note Parse_Comma won't crash if it doesn't find one.
 */

     CASE (LEFT_ANGLE_TOKEN)
       *Terms=2;  // !!!!!!! add this line to fix the bug !!!!!!
       Express[X] = Parse_Float();   Parse_Comma();
       Express[Y] = Parse_Float();   Parse_Comma();

       EXPECT
         CASE_EXPRESS
           /* If a 3th float is found, parse it. */
           Express[2] = Parse_Float(); Parse_Comma();
---------------------------

-Nathan Kopp


Post a reply to this message

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