diff options
author | Torbjörn Andersson | 2005-10-16 13:53:15 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2005-10-16 13:53:15 +0000 |
commit | c6a6d8945330c332219251bd58e379c5da5816f5 (patch) | |
tree | 504d5b92696001d01ea7476da2b9f46a2d59cc10 /sword2 | |
parent | 6ee249743c11fd8cb6a0f5685e1e24939fedb0e4 (diff) | |
download | scummvm-rg350-c6a6d8945330c332219251bd58e379c5da5816f5.tar.gz scummvm-rg350-c6a6d8945330c332219251bd58e379c5da5816f5.tar.bz2 scummvm-rg350-c6a6d8945330c332219251bd58e379c5da5816f5.zip |
Don't remove the cursor character from the savegame name until the very
last moment. Should fix bug #1327439.
svn-id: r19109
Diffstat (limited to 'sword2')
-rw-r--r-- | sword2/controls.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sword2/controls.cpp b/sword2/controls.cpp index 4dc5b65f91..81456c84ed 100644 --- a/sword2/controls.cpp +++ b/sword2/controls.cpp @@ -1378,8 +1378,6 @@ void SaveRestoreDialog::setResult(int result) { if (_mode == kSaveDialog) { if (_editPos <= _firstPos) return; - - _editBuffer[_editPos] = 0; } } @@ -1387,12 +1385,14 @@ void SaveRestoreDialog::setResult(int result) { } int SaveRestoreDialog::runModal() { - int result = Dialog::runModal(); if (result) { switch (_mode) { case kSaveDialog: + // Remove the cursor character from the savegame name + _editBuffer[_editPos] = 0; + if (_vm->saveGame(_selectedSlot, (byte *)&_editBuffer[_firstPos]) != SR_OK) result = 0; break; |