diff options
-rw-r--r-- | scumm/saveload.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index e5bcf73a7d..377a4d49d5 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -78,7 +78,8 @@ void ScummEngine::requestSave(int slot, const char *name, bool temporary) { _saveTemporaryState = temporary; _saveLoadFlag = 1; // 1 for save assert(name); - strcpy(_saveLoadName, name); + strncpy(_saveLoadName, name, sizeof(_saveLoadName)); + _saveLoadName[sizeof(_saveLoadName) - 1] = 0; } void ScummEngine::requestLoad(int slot) { |