aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-10-07 23:07:25 +0300
committerEugene Sandulenko2013-10-07 23:07:25 +0300
commitdcad1cfb5563e81add678857771874ef57571976 (patch)
treea1712dae1ca4a9e71ebd2072db1a4930eff221de /engines
parentaac0924b0e7d23721b59b94b2a5762a470fcac93 (diff)
downloadscummvm-rg350-dcad1cfb5563e81add678857771874ef57571976.tar.gz
scummvm-rg350-dcad1cfb5563e81add678857771874ef57571976.tar.bz2
scummvm-rg350-dcad1cfb5563e81add678857771874ef57571976.zip
AGI: Fix buffer overrun. CID 1004033
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/loader_v2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/agi/loader_v2.cpp b/engines/agi/loader_v2.cpp
index ee69bb5b27..458927a3bc 100644
--- a/engines/agi/loader_v2.cpp
+++ b/engines/agi/loader_v2.cpp
@@ -178,7 +178,7 @@ int AgiLoader_v2::loadResource(int t, int n) {
uint8 *data = NULL;
debugC(3, kDebugLevelResources, "(t = %d, n = %d)", t, n);
- if (n > MAX_DIRS)
+ if (n >= MAX_DIRS)
return errBadResource;
switch (t) {