|
|
POV-Ray 3.6.1
bbox.cpp:596
If there are too many (>32k) infinite objects, the short int index 'i'
overflows
and attempts to reference Infinite[-32767], which naturally spews core.
I suggest throwing an error in the case of overflow, and perhaps bumping up
'i' to an unsigned int, if there's any sane scene that uses 32k infinite
objects.
Less critically, I'd suggest moving the declaration of 'i' to the top of the
block enclosing the 'for' loop, or into the 'for' loop itself. It would
make the code a little easier to read, though I don't know what your coding
standards are.
-Eric
Post a reply to this message
|
|
|
|
Eric Buddington wrote:
> POV-Ray 3.6.1
> bbox.cpp:596
>
> If there are too many (>32k) infinite objects, the short int index 'i'
> overflows
> and attempts to reference Infinite[-32767], which naturally spews core.
>
> I suggest throwing an error in the case of overflow, and perhaps bumping up
> 'i' to an unsigned int, if there's any sane scene that uses 32k infinite
> objects.
Seems correct although to be consistent with other places
(Build_Bounding_Slabs) you should use 'long'.
> Less critically, I'd suggest moving the declaration of 'i' to the top of the
> block enclosing the 'for' loop, or into the 'for' loop itself. It would
> make the code a little easier to read, though I don't know what your coding
> standards are.
This code is quite old so the declarations obey older restrictions.
Christoph
--
POV-Ray tutorials, include files, Landscape of the week:
http://www.imagico.de/ (Last updated 31 Oct. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/
Post a reply to this message
|
|