Permalink
Browse files

TITANIC: Fix Coverity warnings

  • Loading branch information...
dreammaster committed Oct 9, 2017
1 parent e30bf60 commit 721041bc3083d45174f4bcd119ba192a9385a452
Showing with 4 additions and 4 deletions.
  1. +1 −3 engines/titanic/true_talk/tt_npc_script.cpp
  2. +3 −1 engines/titanic/true_talk/tt_vocab.cpp
@@ -306,15 +306,13 @@ int TTnpcScript::handleQuote(const TTroomScript *roomScript, const TTsentence *s
error("Invalid dialogue index in bot script");
TThandleQuoteEntry &quote = _quotes[dialogueId];
int rangeLimit;
int rangeLimit = quote._index;
if (isQuoteDialled()) {
// Barbot and Doorbot response is affected by dial region
int dialRegion = getDialRegion(0);
if (dialRegion != 1) {
rangeLimit = MAX((int)quote._tag1 - 20, 20);
}
} else {
rangeLimit = quote._index;
}
dialogueId = ((remainder + _quotes._incr) % 100) >= (uint)rangeLimit
@@ -315,7 +315,9 @@ TTword *TTvocab::getSuffixedWord(TTstring &str, TTword **srcWord) const {
if (word) {
if (word->_wordClass == WC_ACTION) {
dynamic_cast<TTaction *>(word)->setVal(1);
TTaction *action = dynamic_cast<TTaction *>(word);
assert(action);
action->setVal(1);
}
} else {
tempStr = str;

0 comments on commit 721041b

Please sign in to comment.