GROOVIE: Fix Spaces in Savegame Naming.
This patch was originally from bug Trac #6276 and was submitted by bluegr.
This commit is contained in:
parent
63f0d47b99
commit
f66ec9fe21
2 changed files with 4 additions and 1 deletions
|
@ -128,6 +128,7 @@ Common::InSaveFile *SaveLoad::openForLoading(const Common::String &target, int s
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
case 16: // @
|
case 16: // @
|
||||||
|
case 254: // . (generated when pressing space)
|
||||||
c = ' ';
|
c = ' ';
|
||||||
break;
|
break;
|
||||||
case 244: // $
|
case 244: // $
|
||||||
|
|
|
@ -439,9 +439,11 @@ void Script::savegame(uint slot) {
|
||||||
// Cache the saved name
|
// Cache the saved name
|
||||||
for (int i = 0; i < 15; i++) {
|
for (int i = 0; i < 15; i++) {
|
||||||
newchar = _variables[i] + 0x30;
|
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';
|
save[i] = '\0';
|
||||||
break;
|
break;
|
||||||
|
} else if (newchar == 0x2E) { // '.', generated when space is pressed
|
||||||
|
save[i] = ' ';
|
||||||
} else {
|
} else {
|
||||||
save[i] = newchar;
|
save[i] = newchar;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue