[Scummvm-cvs-logs] SF.net SVN: scummvm:[35986] scummvm/trunk/engines/sword1/control.cpp
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Wed Jan 21 20:46:54 CET 2009
Revision: 35986
http://scummvm.svn.sourceforge.net/scummvm/?rev=35986&view=rev
Author: eriktorbjorn
Date: 2009-01-21 19:46:51 +0000 (Wed, 21 Jan 2009)
Log Message:
-----------
Don't allow the nul character in savegame names, since that terminates the
string. This happens, for instance, when pressing the Shift key. (I usually start
my savegame names with an upper-case letter, and I couldn't understand why it
didn't seem to register any of my keypresses.)
Modified Paths:
--------------
scummvm/trunk/engines/sword1/control.cpp
Modified: scummvm/trunk/engines/sword1/control.cpp
===================================================================
--- scummvm/trunk/engines/sword1/control.cpp 2009-01-21 19:29:02 UTC (rev 35985)
+++ scummvm/trunk/engines/sword1/control.cpp 2009-01-21 19:46:51 UTC (rev 35986)
@@ -697,7 +697,7 @@
uint8 len = _saveNames[_selectedSavegame].size();
if ((kbd.keycode == Common::KEYCODE_BACKSPACE) && len) // backspace
_saveNames[_selectedSavegame].deleteLastChar();
- else if (keyAccepted(kbd.ascii) && (len < 31)) {
+ else if (kbd.ascii && keyAccepted(kbd.ascii) && (len < 31)) {
_saveNames[_selectedSavegame].insertChar(kbd.ascii, len);
}
showSavegameNames();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list