AGI: Null terminate string. CID 1003890

This commit is contained in:
Eugene Sandulenko 2013-04-27 08:46:24 +03:00
parent 4e7a117cd2
commit 9d087cb314

View file

@ -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;