]> granicus.if.org Git - nethack/commitdiff
fix nethackw start without arguments
authornhmall <nhmall@nethack.org>
Thu, 29 Nov 2018 04:29:28 +0000 (23:29 -0500)
committernhmall <nhmall@nethack.org>
Thu, 29 Nov 2018 04:29:28 +0000 (23:29 -0500)
The Windows graphical version in NetHackW.exe is meant to lock
itself to its own windowtype and ignore the OPTIONS=windowtype
setting in the config file, but the code to perform the lock
only did so if (argc > 1).

sys/share/pcmain.c

index 93674ab341dd2e7c191d0a6fb607bd061db87390..1c07555cc765c8023bd3e1a0cc1ed97596a94d3d 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 pcmain.c        $NHDT-Date: 1524413707 2018/04/22 16:15:07 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.74 $ */
+/* NetHack 3.6 pcmain.c        $NHDT-Date: 1543465755 2018/11/29 04:29:15 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.101 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Derek S. Ray, 2015. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -177,7 +177,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
     choose_windows(DEFAULT_WINDOW_SYS);
 #else
     choose_windows(default_window_sys);
-    if (argc > 1
+    if (argc >= 1
         && !strcmpi(default_window_sys, "mswin")
         && strstri(argv[0], "nethackw.exe"))
         iflags.windowtype_locked = TRUE;