send lua warnings to paniclog instead to player

Now that the garbage collection problem has been fixed, record lua
warnings in the paniclog file rather than showing them on the screen.

Move nhl_warn()'s warnbuf[] to struct g in case restart ever gets
implemented so that it can be cleared if the restart occurred while
a warning message was under construction.
This commit is contained in:
PatR
2022-06-01 01:03:11 -07:00
parent e7080a6183
commit 18639d2ef2
3 changed files with 12 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 decl.c $NHDT-Date: 1645000574 2022/02/16 08:36:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.248 $ */
/* NetHack 3.7 decl.c $NHDT-Date: 1654070576 2022/06/01 08:02:56 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.255 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2009. */
/* NetHack may be freely redistributed. See license for details. */
@@ -511,6 +511,7 @@ const struct instance_globals g_init = {
/* nhlua.c */
UNDEFINED_VALUE, /* luacore */
DUMMY, /* lua_warnbuf[] */
/* o_init.c */
DUMMY, /* disco */