Re: [AD] Zero sized bitmaps

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


> > So why aren't you checking that your second index <bmp->w?
> 
> 
> so i can save on an instruction by using a do {} while  instead of a 
> while{};

You should never use direct memory acces on bitmaps unless you know that 
you're within bounds. In this case, you're not checking the bounds and in 
fact you are out of bounds.
In other words, if you plan on using 0x1 bitmaps, you should check that you 
are within the bitmap bounds before using line[0][0] because it may be out 
of bounds.

Evert




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