aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorTorbjörn Andersson2013-12-16 20:32:13 +0100
committerTorbjörn Andersson2013-12-16 20:32:13 +0100
commit1d8b6a6843bd0fd4298b6a46f107230bcba52b6d (patch)
tree1d74305ed59e136c3a0c3e250a30c303f38056af /engines/fullpipe
parentfe8d2df77c63bb23b070dda89c97f7a491e54d49 (diff)
downloadscummvm-rg350-1d8b6a6843bd0fd4298b6a46f107230bcba52b6d.tar.gz
scummvm-rg350-1d8b6a6843bd0fd4298b6a46f107230bcba52b6d.tar.bz2
scummvm-rg350-1d8b6a6843bd0fd4298b6a46f107230bcba52b6d.zip
FULLPIPE: Fix off-by-one error when checking valid 'idx'
Verified by sev, but I haven't actually seen it cause any problems.
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/messages.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index d145a11531..e8fcf75fb6 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -331,7 +331,7 @@ void MessageQueue::addExCommandToEnd(ExCommand *ex) {
}
ExCommand *MessageQueue::getExCommandByIndex(uint idx) {
- if (idx > getCount())
+ if (idx >= getCount())
return 0;
Common::List<ExCommand *>::iterator it = _exCommands.begin();
@@ -345,7 +345,7 @@ ExCommand *MessageQueue::getExCommandByIndex(uint idx) {
}
void MessageQueue::deleteExCommandByIndex(uint idx, bool doFree) {
- if (idx > getCount())
+ if (idx >= getCount())
return;
Common::List<ExCommand *>::iterator it = _exCommands.begin();