aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/detection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi/detection.cpp')
-rw-r--r--engines/agi/detection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index 7b8a464ac6..ff59084ffe 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -1907,7 +1907,7 @@ Common::ADGameDescList fallbackDetector(const FSList *fslist) {
for (IntMap::const_iterator f = allFiles.begin(); f != allFiles.end(); ++f) {
if (f->_key.hasSuffix("vol.0")) {
memset(name, 0, 8);
- strncpy(name, f->_key.c_str(), MAX((uint)8, f->_key.size() > 5 ? f->_key.size() - 5 : f->_key.size()));
+ strncpy(name, f->_key.c_str(), MIN((uint)8, f->_key.size() > 5 ? f->_key.size() - 5 : f->_key.size()));
if (allFiles.contains("object") && allFiles.contains("words.tok") &&
allFiles.contains(Common::String(name) + "dir")) {