]> granicus.if.org Git - nethack/commitdiff
Simple options: guard against boolean being null
authorPasi Kallinen <paxed@alt.org>
Thu, 4 Aug 2022 17:08:19 +0000 (20:08 +0300)
committerPasi Kallinen <paxed@alt.org>
Thu, 4 Aug 2022 17:08:19 +0000 (20:08 +0300)
src/options.c

index 235d48894feb08351e7e10eb1e8b3cd98fe01138..9e173aca0bd0fe0e3723ef96ef7432669fcd918d 100644 (file)
@@ -7789,6 +7789,8 @@ rerun:
             switch (allopt[i].opttyp) {
             case BoolOpt:
                 bool_p = allopt[i].addr;
+                if (!bool_p)
+                    continue;
                 Sprintf(buf, fmtstr_doset, "",
                         name, *bool_p ? "X" : " ");
                 break;