Skip to content

Commit

Permalink
TITANIC: Fix Coverity reported warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Feb 14, 2017
1 parent 534ec94 commit 3a41bed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions engines/titanic/sound/audio_buffer.cpp
Expand Up @@ -27,6 +27,7 @@ namespace Titanic {

CAudioBuffer::CAudioBuffer(int maxSize) : _finished(false) {
_data.resize(maxSize);
reset();
}

void CAudioBuffer::reset() {
Expand Down
3 changes: 2 additions & 1 deletion engines/titanic/sound/wave_file.cpp
Expand Up @@ -171,7 +171,8 @@ void CWaveFile::load(byte *data, uint dataSize) {

// Parse the wave header
Common::MemoryReadStream wavStream(data, dataSize, DisposeAfterUse::NO);
Audio::loadWAVFromStream(wavStream, _dataSize, _rate, _flags, &_wavType);
if (!Audio::loadWAVFromStream(wavStream, _dataSize, _rate, _flags, &_wavType))
error("Invalid wave file");
_headerSize = wavStream.pos();
}

Expand Down

0 comments on commit 3a41bed

Please sign in to comment.