From: Alex Kompel Date: Mon, 1 Jun 2015 15:20:56 +0000 (-0700) Subject: hilite_status: spaces in color names break option parsing X-Git-Tag: NetHack-3.6.0_RC01~311 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a9ae2bcbd49ab85d58b786adaf91543dab394cd;p=nethack hilite_status: spaces in color names break option parsing --- diff --git a/src/botl.c b/src/botl.c index 3ba06f526..210a21e13 100644 --- a/src/botl.c +++ b/src/botl.c @@ -1380,6 +1380,7 @@ char *buf; int idx; { static const char *a[] = { "bold", "inverse", "normal" }; + char* p = 0; if (buf) { buf[0] = '\0'; @@ -1387,6 +1388,9 @@ int idx; Strcpy(buf, a[idx + 3]); else if (idx >= 0 && idx < CLR_MAX) Strcpy(buf, c_obj_colors[idx]); + /* replace spaces with - */ + for(p = buf; *p; p++) + if(*p == ' ') *p = '-'; } return buf; }