GROOVIE: Fix Spaces in Savegame Naming.

This patch was originally from bug Trac #6276 and was submitted by
bluegr.
This commit is contained in:
D G Turner 2018-11-03 17:46:57 +00:00 committed by David Turner
parent 63f0d47b99
commit f66ec9fe21
2 changed files with 4 additions and 1 deletions

View File

@ -128,6 +128,7 @@ Common::InSaveFile *SaveLoad::openForLoading(const Common::String &target, int s
case 0:
break;
case 16: // @
case 254: // . (generated when pressing space)
c = ' ';
break;
case 244: // $

View File

@ -439,9 +439,11 @@ void Script::savegame(uint slot) {
// Cache the saved name
for (int i = 0; i < 15; i++) {
newchar = _variables[i] + 0x30;
if ((newchar < 0x30 || newchar > 0x39) && (newchar < 0x41 || newchar > 0x7A)) {
if ((newchar < 0x30 || newchar > 0x39) && (newchar < 0x41 || newchar > 0x7A) && newchar != 0x2E) {
save[i] = '\0';
break;
} else if (newchar == 0x2E) { // '.', generated when space is pressed
save[i] = ' ';
} else {
save[i] = newchar;
}