X11: Fix renaming at player selection

Due to the new player selection dialog I did, it was possible
to rename your character - but this didn't rename the lock files
and tried to load a save from the wrong name.

This is a bit of a hack, but seems to work and didn't seem to
cause problems for the tty.
This commit is contained in:
Pasi Kallinen
2017-10-31 21:18:21 +02:00
parent 72978d69fa
commit fe9762d1cc
6 changed files with 47 additions and 27 deletions

View File

@@ -1714,7 +1714,7 @@ plnamesuffix()
do {
if (!*plname)
askname(); /* fill plname[] if necessary */
askname(); /* fill plname[] if necessary, or set defer_plname */
/* Look for tokens delimited by '-' */
if ((eptr = index(plname, '-')) != (char *) 0)
@@ -1735,7 +1735,7 @@ plnamesuffix()
else if ((i = str2align(sptr)) != ROLE_NONE)
flags.initalign = i;
}
} while (!*plname);
} while (!*plname && !iflags.defer_plname);
/* commas in the plname confuse the record file, convert to spaces */
for (sptr = plname; *sptr; sptr++) {