diff options
author | Filippos Karapetis | 2008-01-10 10:34:23 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-01-10 10:34:23 +0000 |
commit | 947608cd91ed379e3b490784ee34e268adcd0698 (patch) | |
tree | 1d77f054cd55730ceaa328577bcf37efd4aa9e19 | |
parent | 1d4efdcaa1807140f735a908a23ce3e346eace75 (diff) | |
download | scummvm-rg350-947608cd91ed379e3b490784ee34e268adcd0698.tar.gz scummvm-rg350-947608cd91ed379e3b490784ee34e268adcd0698.tar.bz2 scummvm-rg350-947608cd91ed379e3b490784ee34e268adcd0698.zip |
Changed an assertion to a warning
svn-id: r30369
-rw-r--r-- | engines/saga/sprite.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/saga/sprite.cpp b/engines/saga/sprite.cpp index 1efe327b80..34b54e30f9 100644 --- a/engines/saga/sprite.cpp +++ b/engines/saga/sprite.cpp @@ -177,7 +177,13 @@ void Sprite::loadList(int resourceId, SpriteList &spriteList) { void Sprite::getScaledSpriteBuffer(SpriteList &spriteList, int spriteNumber, int scale, int &width, int &height, int &xAlign, int &yAlign, const byte *&buffer) { SpriteInfo *spriteInfo; - assert(spriteList.spriteCount>spriteNumber); + + if (spriteList.spriteCount <= spriteNumber) { + // this can occur in IHNM while loading a saved game from chapter 1-5 when being in the end chapter + warning("spriteList.spriteCount <= spriteNumber"); + return; + } + spriteInfo = &spriteList.infoList[spriteNumber]; if (scale < 256) { |