From: Pasi Kallinen Date: Thu, 4 Aug 2022 17:08:19 +0000 (+0300) Subject: Simple options: guard against boolean being null X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c8bd39c74866b4c1316ca4b4b7eae0e60f7c72ad;p=nethack Simple options: guard against boolean being null --- diff --git a/src/options.c b/src/options.c index 235d48894..9e173aca0 100644 --- a/src/options.c +++ b/src/options.c @@ -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;