From fb5dcffff19c8bb5c516a6ddcaea397fb709194b Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Fri, 3 Dec 2004 22:39:55 +0000 Subject: Minor cleanup, one more time. Fixed a crash when returning to the launcher at the end of the game. I played FOTAQ (french) from the beginning to the end some hours ago, I haven't encountered any special problems/glitches (except the one mentionned above). svn-id: r15979 --- queen/logic.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'queen/logic.cpp') diff --git a/queen/logic.cpp b/queen/logic.cpp index 565476ecf1..826ec3137e 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -456,18 +456,22 @@ const char *Logic::roomName(uint16 roomNum) const { } const char *Logic::objectName(uint16 objNum) const { + assert(objNum >= 1 && objNum <= _numNames); return _objName[objNum].c_str(); } const char *Logic::objectTextualDescription(uint16 objNum) const { + assert(objNum >= 1 && objNum <= _numDescriptions); return _objDescription[objNum].c_str(); } const char *Logic::joeResponse(int i) const { + assert(i >= 1 && i <= JOE_RESPONSE_MAX); return _joeResponse[i].c_str(); } const char *Logic::verbName(Verb v) const { + assert(v >= 0 && v <= 12); return _verbName[v].c_str(); } @@ -2034,6 +2038,7 @@ void Logic::startCredits(const char *filename) { void Logic::stopCredits() { if (_credits) { + _vm->display()->clearTexts(0, 199); delete _credits; _credits = NULL; } -- cgit v1.2.3