avoid newsym(0,0) for vault guard

When a vault guard is being moving off the map to <0,0> to wait until
his temporary corridor gets removed, don't try to update the map for
that off-the-screen location in order to avoid triggering impossible()
from newsym().

Plus a trivial tweak to NH_abort().  Its argument is never modified so
declare it as such.
This commit is contained in:
PatR
2026-05-11 15:06:13 -07:00
parent 45ab4eb1aa
commit c42d35eac0
4 changed files with 10 additions and 6 deletions
+4 -2
View File
@@ -12,8 +12,10 @@ fix issue where the new game startup message was stating 'Work-in-progress'
even when NH_DEVEL_STATUS was set to NH_STATUS_POSTRELEASE
if 'mention_decor' was set in config file or NETHACKOPTIONS,
starting the game told you that "you are standing on stairs which lead
out of the dungeon", even when the player entered the tutorial where that
wasn't true
out of the dungeon", even when the player entered the tutorial where
that wasn't true
when a vault guard was moved off the map, an impossible about trying to update
map location <0,0> was issued
doc: use full URL for nethack.org in Guidebook.mn
doc: fix a paste error in Guidebook.tex
doc: fix spelling correction in nethack.6
+1 -1
View File
@@ -995,7 +995,7 @@ extern void done1(int);
extern int done2(void);
extern void done_in_by(struct monst *, int) NONNULLARG1;
extern void done_object_cleanup(void);
extern void NH_abort(char *);
extern void NH_abort(const char *);
#endif /* !MAKEDEFS_C && MDLIB_C && !CPPREGEX_C */
#if !defined(CPPREGEX_C)
ATTRNORETURN extern void panic(const char *, ...) PRINTF_F(1, 2) NORETURN;
+2 -2
View File
@@ -1896,7 +1896,7 @@ build_english_list(char *in)
# endif
void
NH_abort(char *why USED_FOR_CRASHREPORT)
NH_abort(const char *why USED_FOR_CRASHREPORT)
{
#ifdef PANICTRACE
int gdb_prio = SYSOPT_PANICTRACE_GDB;
@@ -1912,7 +1912,7 @@ NH_abort(char *why USED_FOR_CRASHREPORT)
#ifdef PANICTRACE
#ifdef CRASHREPORT
if(!submit_web_report(1, "Panic", why))
if (!submit_web_report(1, "Panic", why))
#endif
{
#ifndef VMS
+3 -1
View File
@@ -1653,7 +1653,9 @@ postmov(
u_on_newpos(mtmp->mx, mtmp->my);
swallowed(0);
} else {
newsym(mtmp->mx, mtmp->my);
/* only call newsym() when not a vault guard moving to <0,0> */
if (mtmp->mx)
newsym(mtmp->mx, mtmp->my);
}
} /* mmoved==MMOVE_MOVED */