From 88f5dcbfb4f8cf583adf65e305af3668c2ef5e56 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 15 May 2018 19:35:36 -0400 Subject: [PATCH] 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 --- doc/fixes36.2 | 1 + src/botl.c | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/doc/fixes36.2 b/doc/fixes36.2 index ad7ea39c2..514209ff1 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -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 diff --git a/src/botl.c b/src/botl.c index 68a38b62b..a191e1be8 100644 --- a/src/botl.c +++ b/src/botl.c @@ -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) {