]> granicus.if.org Git - nethack/commitdiff
another lua warning bit
authorPatR <rankin@nethack.org>
Wed, 1 Jun 2022 20:45:57 +0000 (13:45 -0700)
committerPatR <rankin@nethack.org>
Wed, 1 Jun 2022 20:45:57 +0000 (13:45 -0700)
I forgot to do this with yesterday's post garbage collection fix
update.  Record lua warnings in paniclog during normal play too, not
just when in wizard mode.

src/nhlua.c

index 09709469621871ac9e99f774702cb60aaf746d7c..4cd7a204d914b168aafa7daf9b5a5391c738a9b6 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 nhlua.c $NHDT-Date: 1654070580 2022/06/01 08:03:00 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.83 $ */
+/* NetHack 3.7 nhlua.c $NHDT-Date: 1654116350 2022/06/01 20:45:50 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.84 $ */
 /*      Copyright (c) 2018 by Pasi Kallinen */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -2330,9 +2330,7 @@ nhlL_newstate(nhl_sandbox_info *sbi)
 
     lua_atpanic(L, nhl_panic);
 #if LUA_VERSION_NUM == 504
-    /* issue lua warnings only when in wizard mode, at least until
-       someone figures out and fixes the garbage collection problem */
-    lua_setwarnf(L, wizard ? nhl_warn : (lua_WarnFunction) 0, L);
+    lua_setwarnf(L, nhl_warn, L);
 #endif
 
 #ifdef NHL_SANDBOX