aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2013-04-27 08:46:24 +0300
committerEugene Sandulenko2013-04-27 08:46:24 +0300
commit9d087cb314490246a21a4e0ef57b1b126e3e3ad4 (patch)
treec866e5d1eabaf1b86aaff879767144f720f43d41
parent4e7a117cd28900bfdd5326115cd6e568394fb145 (diff)
downloadscummvm-rg350-9d087cb314490246a21a4e0ef57b1b126e3e3ad4.tar.gz
scummvm-rg350-9d087cb314490246a21a4e0ef57b1b126e3e3ad4.tar.bz2
scummvm-rg350-9d087cb314490246a21a4e0ef57b1b126e3e3ad4.zip
AGI: Null terminate string. CID 1003890
-rw-r--r--engines/agi/saveload.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index ea102bf0d4..c449f076e7 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -678,7 +678,7 @@ int AgiEngine::selectSlot() {
switch (key) {
case KEY_ENTER:
rc = active;
- strncpy(_game.strings[MAX_STRINGS], desc[i], MAX_STRINGLEN);
+ Common::strlcpy(_game.strings[MAX_STRINGS], desc[i], MAX_STRINGLEN);
debugC(8, kDebugLevelMain | kDebugLevelInput, "Button pressed: %d", rc);
exitSelectSlot = true;
break;