From: Pasi Kallinen Date: Fri, 20 Mar 2020 19:04:16 +0000 (+0200) Subject: Prevent setting boulder symbol to a control character X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6227bdf43872e6288dde6fe1f2ec0f2026b38678;p=nethack Prevent setting boulder symbol to a control character --- diff --git a/src/options.c b/src/options.c index 4570bcf1f..63740330d 100644 --- a/src/options.c +++ b/src/options.c @@ -739,7 +739,10 @@ char *op UNUSED; clash = opts[0] ? 1 : 0; else if (opts[0] >= '1' && opts[0] < WARNCOUNT + '0') clash = 2; - if (clash) { + if (opts[0] < ' ') { + config_error_add("boulder symbol cannot be a control character"); + return optn_ok; + } else if (clash) { /* symbol chosen matches a used monster or warning symbol which is not good - reject it */ config_error_add("Badoption - boulder symbol '%s' would conflict "