NEVERHOOD: Fix crash when playing uncompressed sounds

This happened to me when (or shortly afterwards; I'm not quite sure)
lighting the fuse on the TNT dummy.
This commit is contained in:
Torbjörn Andersson 2013-12-28 14:21:48 +01:00
parent 185c232b60
commit ba3172b55f

View File

@ -560,7 +560,7 @@ int NeverhoodAudioStream::readBuffer(int16 *buffer, const int numSamples) {
}
} else {
memcpy(buffer, _buffer, bytesRead);
buffer += bytesRead;
buffer += samplesRead;
}
if (bytesRead < bytesToRead || _stream->pos() >= _stream->size() || _stream->err() || _stream->eos()) {