POV-Ray : Newsgroups : povray.programming : Bug report and solution (2nd trial) Server Time
29 Jul 2024 08:18:13 EDT (-0400)
  Bug report and solution (2nd trial) (Message 1 to 2 of 2)  
From: Thomas Willhalm
Subject: Bug report and solution (2nd trial)
Date: 7 Jul 1998 05:47:31
Message: <qqmemvyqc7x.fsf@goldach.informatik.uni-konstanz.de>
To the POVRAY-Team,

About ten month ago I emailed a bug report to you. I didn't get any
response. Now, in comp.graphics.rendering.raytracing some one
reported that the current beta 3.1b4 still contains the bug. 
(I can't verify it myself, because I use a UNIX machine.)

The bug is the following:

The operator .v (or .y) is not working for two dimensional vectors.
For example the parser stops in the following line:

#debug str(<2,6>.v,0,0)

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 hope that you will correct this bug.

ThW

-- 
Tho### [at] uni-konstanzde
http://www.informatik.uni-konstanz.de/~willhalm/
Tschieses lavs ju
An den BND und CIA: Eisbombe Fremdenfuehrer Siegfried Heilsarmee


Post a reply to this message

From: Nathan Kopp
Subject: Re: Bug report and solution (2nd trial)
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.