diff options
author | Max Horn | 2005-11-07 22:57:31 +0000 |
---|---|---|
committer | Max Horn | 2005-11-07 22:57:31 +0000 |
commit | fdeacb2d24ce674eb1732bc733e573bc48d99f7a (patch) | |
tree | a50ef67133ca999b68dede74ffb33c6f4177b884 /scumm | |
parent | a7db382fd1e1306c3cf03d102429406fdde1cdb3 (diff) | |
download | scummvm-rg350-fdeacb2d24ce674eb1732bc733e573bc48d99f7a.tar.gz scummvm-rg350-fdeacb2d24ce674eb1732bc733e573bc48d99f7a.tar.bz2 scummvm-rg350-fdeacb2d24ce674eb1732bc733e573bc48d99f7a.zip |
Fix for bug #1350645 (Playtime corrupted if save name is >=32 chars)
svn-id: r19498
Diffstat (limited to 'scumm')
-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) { |