Re: [AD] Memory overrun in load_wav

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


> Sorry, I misread: that'd be:
> len = (length+channels-1) / channels;
> instead of
> len = length / channels;

I like that, it's a cleaner solution. As Chris says, you could regard files
like this as bad files since it doesn't make sense to have an odd number of
data bytes for stereo samples, but files like this are obviously out there
so we'd may as well deal with them cleanly.

Cheers
Chris






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