- Fixed uninitialized data for libsndfile.

According to the API docs, when opening a file for read, SF_INFO::format must be set to 0.
Discovered with Valgrind while running Deus Vult 2 map01.
This commit is contained in:
Edoardo Prezioso 2017-01-16 22:46:50 +01:00 committed by Christoph Oelckers
parent 8f6571241d
commit bfb7b82bcc

View file

@ -60,6 +60,7 @@ bool SndFileDecoder::open(FileReader *reader)
SF_VIRTUAL_IO sfio = { file_get_filelen, file_seek, file_read, file_write, file_tell };
Reader = reader;
SndInfo.format = 0;
SndFile = sf_open_virtual(&sfio, SFM_READ, &SndInfo, this);
if (SndFile)
{