Skip to content

Commit

Permalink
AURORA: Add an assert() on the stream in Small::decompress()
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Nov 19, 2016
1 parent aa6c01a commit e1b6774
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/aurora/smallfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ void Small::decompress(Common::ReadStream &small, Common::WriteStream &out) {
Common::SeekableReadStream *Small::decompress(Common::SeekableReadStream *small) {
Common::ScopedPtr<Common::SeekableReadStream> in(small);

assert(in);

uint32 type, size;
readSmallHeader(*in, type, size);

Expand Down Expand Up @@ -176,6 +178,7 @@ Common::SeekableReadStream *Small::decompress(Common::ReadStream &small) {
Common::SeekableReadStream *Small::decompress(Common::ReadStream *small) {
Common::ScopedPtr<Common::ReadStream> in(small);

assert(in);
return decompress(*in);
}

Expand Down

0 comments on commit e1b6774

Please sign in to comment.