data.base lookup fix
Changing data.base lookup to accept leading spaces as an alternative to the normal leading tab ended up adding an invalid integrity check. Lines without any leading space or tab were considered to be in error but empty lines are present so need to be accepted.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.60 $ $NHDT-Date: 1578690701 2020/01/10 21:11:41 $
|
||||
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.61 $ $NHDT-Date: 1578761136 2020/01/11 16:45:36 $
|
||||
|
||||
General Fixes and Modified Features
|
||||
-----------------------------------
|
||||
@@ -66,6 +66,9 @@ if running and Blind or Stunned or Fumbling or Dex < 10, encountering a closed
|
||||
door orthogonally would keep reporting "ouch! you bump into a door"
|
||||
repeatedly until eventually interrupted by approaching monster or
|
||||
hunger or ^C
|
||||
data.base lookup of an entry with any blank lines would falsely claim that
|
||||
"'data' file in wrong fromat or corrupted" after some extra checks
|
||||
were added while investigating tab handling anomalies
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 pager.c $NHDT-Date: 1578668022 2020/01/10 14:53:42 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.181 $ */
|
||||
/* NetHack 3.6 pager.c $NHDT-Date: 1578761137 2020/01/11 16:45:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.182 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2018. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -802,7 +802,7 @@ char *supplemental_name;
|
||||
do {
|
||||
++tp;
|
||||
} while (tp < &tabbuf[8] && *tp == ' ');
|
||||
} else {
|
||||
} else if (*tp) { /* empty lines are ok */
|
||||
goto bad_data_file;
|
||||
}
|
||||
/* if a tab after the leading one is found,
|
||||
|
||||
Reference in New Issue
Block a user