fix spaces in hilite_status option text field not working H7107 (GitHub #88)

Fixes #88

H7107: FWD: spaces in hilite_status option text field not working
This commit is contained in:
nhmall
2018-05-15 19:35:36 -04:00
parent f810a45dc1
commit 88f5dcbfb4
2 changed files with 14 additions and 5 deletions

View File

@@ -11,6 +11,7 @@ last line of config file wasn't being heeded if it had no newline
list MSGTYPE values shows empty strings as reported in H7140
Killing Vlad while he was in bat/fog cloud/wolf form gave poorly
worded feedback when he reverted to vampire form
spaces in hilite_status option title text field not working
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 botl.c $NHDT-Date: 1525696908 2018/05/07 12:41:48 $ $NHDT-Branch: tty-status $:$NHDT-Revision: 1.91 $ */
/* NetHack 3.6 botl.c $NHDT-Date: 1526427319 2018/05/15 23:35:19 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.92 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1477,10 +1477,18 @@ boolean from_configfile;
c = lowc(*op);
if (c == ' ') {
if (fldnum >= 1) {
rslt = parse_status_hl2(hsbuf, from_configfile);
if (!rslt) {
badopt = TRUE;
break;
if (fldnum == 1 && strcmpi(hsbuf[0], "title") == 0) {
/* spaces are allowed in title */
hsbuf[fldnum][ccount++] = c;
hsbuf[fldnum][ccount] = '\0';
op++;
continue;
} else {
rslt = parse_status_hl2(hsbuf, from_configfile);
if (!rslt) {
badopt = TRUE;
break;
}
}
}
for (i = 0; i < MAX_THRESH; ++i) {