]> granicus.if.org Git - nethack/commitdiff
Prevent setting boulder symbol to a control character
authorPasi Kallinen <paxed@alt.org>
Fri, 20 Mar 2020 19:04:16 +0000 (21:04 +0200)
committerPasi Kallinen <paxed@alt.org>
Fri, 20 Mar 2020 19:04:16 +0000 (21:04 +0200)
src/options.c

index 4570bcf1fda5194a34d74c1fe7a558f5c594964e..63740330d7d2c23e2ce3e9aea26136d734e62149 100644 (file)
@@ -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 "