Re: [AD] Bug in unstable developers release, sound.c

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


> In the function 'load_wav' (line 951 of the 4.1.9 source), a signed short
is
> compared against EOF, and will prematurely stop if it encounters valid
> data of -1. This only occurs on 16 bit data.

This code is actually fine, because the variable "s" is a 32-bit int, and so
pack_getw will fill it with a number between 0 and 65535.

> Also, in line 944, the result of a 'pack_fread' is compared to the wrong
> variable, though it would only matter on a truncated stereo 8 bit wav
file.

That's true, your proposed patch looks good to me.

cheers,
chris






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