POV-Ray : Newsgroups : povray.general : Bug in #default directive parsing Server Time
8 Aug 2024 06:18:01 EDT (-0400)
  Bug in #default directive parsing (Message 1 to 2 of 2)  
From: Christophe Bouffartigue
Subject: Bug in #default directive parsing
Date: 9 Mar 2001 02:45:31
Message: <3AA88A1A.9EE4DE0D@nanterre.marelli.fr>
Hi all.

Yesterday, I've posted a bug report in povray.bugreports (same thread
title as this one).

As not everybody read p.bugreports, I copy my message here:

> 
> There's a bug in the #default directive parsing, that may be put in
> evidence with the following code:
> 
> #declare Use_Rad = off;
> 
> #if (Use_Rad = off)
> #debug "\nUse_Rad = off\n"
> #default { texture { finish { ambient 0.4 diffuse 0.6 } } }
> #else
> #debug "\nUse_Rad = on\n"
> #default { texture { finish { ambient 0.0 diffuse 1.0 } } }
> #end
> 
> camera {
>   location <1, 2, -6>
>   look_at <0, 1, 0>
> }
> plane { y, 0
>   texture {
>     pigment { checker color rgb 0, color rgb 1 }
>   }
> }
> sphere { y, 1
>   texture {
>     pigment { color rgb <1, .2, .2> }
>   }
> }
> light_source { <10, 10, -10>, color rgb 1 }
> 
> 
> Whether Use_Rad is on or off, the default texture applied is always the
> seconde one.
> 
> Vahur Krouverk found that the bug is in tokenize.c:
> 
>     CASE (DEFAULT_TOKEN)
> +      if (Skipping)
> +      {
> +          UNGET
> +          EXIT
> +      }
> +      else
> +      {
>           Parse_Default();
>           EXIT
> +      }
>     END_CASE
> 
> The lines with a "+" must be added to correct the bug.
> 
> He also saw that this bug is present with INIT_SPLINE_TOKEN, etc...
> 
> Bye.
> 
> Bouf.
> 

P.S. I now know that I should have posted this here before
povray.bugreports, so no more complaints about this, please ;)


Post a reply to this message

From: Ken
Subject: Re: Bug in #default directive parsing
Date: 9 Mar 2001 03:15:10
Message: <3AA8915C.DC4C45EF@pacbell.net>
Christophe Bouffartigue wrote:
> 
> Hi all.
> 
> Yesterday, I've posted a bug report in povray.bugreports (same thread
> title as this one).
> 
> As not everybody read p.bugreports, I copy my message here:
<snip>
> P.S. I now know that I should have posted this here before
> povray.bugreports, so no more complaints about this, please ;)

The POV-Team took the time to verify this as an actual bug before
it appeared in the bug reports group. Otherwise it would not have
been posted. But thank you for your efforts in finding and reporting
POV-Ray related problems.

-- 
Ken Tyler


Post a reply to this message

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