Mail Archives: djgpp/1997/08/19/15:06:36
On 17 Aug 1997 20:20:35 GMT, gingko69 AT aol DOT com (Gingko 69) wrote:
>>> for( curr_vertex=0; curr_vertex < the_object->num_points;
>>> curr_vertex++)
>
>Try the_object->num_points - 1. In your object the first vertex is [0],
>the second [1] and so on, so you are eventually accessing one vertex that
>doesn't exist.
Surely that isn't true since the compiler is parsing the final one that
does exist, adding one to curr_vertex, finding it is no longer below
the_object->num_points, and so ending the loop before parsing vertex
[the_object->num_points] ?
-Thomas
- Raw text -