aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/agi_v3.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/agi/agi_v3.cpp b/engines/agi/agi_v3.cpp
index 3e90dc11f1..142a6071ca 100644
--- a/engines/agi/agi_v3.cpp
+++ b/engines/agi/agi_v3.cpp
@@ -64,7 +64,7 @@ int AgiLoader_v3::detectGame() {
if (f.hasSuffix("vol.0")) {
memset(_vm->_game.name, 0, 8);
- strncpy(_vm->_game.name, f.c_str(), f.size() > 5 ? f.size() - 5 : f.size());
+ strncpy(_vm->_game.name, f.c_str(), MAX((uint)8, f.size() > 5 ? f.size() - 5 : f.size()));
debugC(3, kDebugLevelMain, "game.name = %s", _vm->_game.name);
_intVersion = 0x3149; // setup for 3.002.149
ec = _vm->v3IdGame();