Re: [AD] Problems with create_rgb_table()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2008-12-14, Colin Ward <lists@xxxxxxxxxx> wrote:
> if (next[curr] == UNUSED) { 
> 
> When this happens, curr is always a large number (usually around 65000) and
> the next array is only 32768 bytes long so it crashes.  I am not sure
> exactly what this routine does or how it does it and even if I did it's a
> complex routine so I wouldn't know how to fix it.

The only place curr is assigned is on line 569.  The obvious thing
would be add assertions that pal[i].r,g,b are in the range 0 to 63
(inclusive) and go from there.

Peter





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/