AGI: Fix buffer overrun. CID 1004033

This commit is contained in:
Eugene Sandulenko 2013-10-07 23:07:25 +03:00
parent aac0924b0e
commit dcad1cfb55

View File

@ -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) {