follow-up to 70b8bc04e for internal recover

This commit is contained in:
nhmall
2024-02-04 00:15:33 -05:00
parent 73feb80a00
commit e201184dd3

View File

@@ -4202,7 +4202,7 @@ recover_savefile(void)
{
NHFILE *gnhfp, *lnhfp, *snhfp;
int lev, savelev, hpid, pltmpsiz, filecmc;
xint16 levc;
xint8 levc;
struct version_info version_data;
int processed[256];
char savename[SAVESIZE], errbuf[BUFSZ], indicator;
@@ -4341,14 +4341,14 @@ recover_savefile(void)
processed[0] = 1;
for (lev = 1; lev < 256; lev++) {
/* level numbers are kept in xint16s in save.c, so the
/* level numbers are kept in xint8's in save.c, so the
* maximum level number (for the endlevel) must be < 256
*/
if (lev != savelev) {
lnhfp = open_levelfile(lev, (char *) 0);
if (lnhfp) {
/* any or all of these may not exist */
levc = (xint16) lev;
levc = (xint8) lev;
(void) write(snhfp->fd, (genericptr_t) &levc, sizeof(levc));
if (!copy_bytes(lnhfp->fd, snhfp->fd)) {
close_nhfile(lnhfp);