Skip to content

Commit

Permalink
SOUND: assert() on the existence of the xwb stream
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Aug 2, 2018
1 parent f01b127 commit 9576070
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sound/xactwavebank_ascii.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
* An ASCII XACT WaveBank, found in the non-Xbox versions of Jade Empire as _xwb.txt files.
*/

#include <cassert>

#include "src/common/error.h"
#include "src/common/strutil.h"
#include "src/common/scopedptr.h"
Expand All @@ -38,6 +40,8 @@
namespace Sound {

XACTWaveBank_ASCII::XACTWaveBank_ASCII(Common::SeekableReadStream *xwb) {
assert(xwb);

Common::ScopedPtr<Common::SeekableReadStream> stream(xwb);

load(*xwb);
Expand Down
4 changes: 4 additions & 0 deletions src/sound/xactwavebank_binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
* people who supplied xwb files to analyze [to Luigi]: john deo, antti
*/

#include <cassert>

#include "src/common/util.h"
#include "src/common/strutil.h"
#include "src/common/error.h"
Expand Down Expand Up @@ -79,6 +81,8 @@ enum WaveFlags {
};

XACTWaveBank_Binary::XACTWaveBank_Binary(Common::SeekableReadStream *xwb) : _xwb(xwb) {
assert(_xwb);

load(*_xwb);
}

Expand Down

0 comments on commit 9576070

Please sign in to comment.