diff --git a/doc/fixes36.3 b/doc/fixes36.3 index f4e36ac3a..daedd86ec 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -79,6 +79,7 @@ for wizard mode 'monpolycontrol', allow usually disallowed type 'chameleon', add Space, Return, and Escape to '? k' (help for menu control keys) hero can no longer negotiate a bribe with a demon lord when deaf wishing for "foo amulet" now yields an "amulet of foo" rather than random one +code in parse_conf_file() to trim trailing blanks/cr was skipping over them Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/files.c b/src/files.c index 92940c9b0..29ad2f1a8 100644 --- a/src/files.c +++ b/src/files.c @@ -3051,9 +3051,9 @@ boolean FDECL((*proc), (char *)); *ep = '\0'; /* trim off spaces at end of line */ - while (--ep >= inbuf + while (ep >= inbuf && (*ep == ' ' || *ep == '\t' || *ep == '\r')) - *ep = '\0'; + *ep-- = '\0'; if (!config_error_nextline(inbuf)) { rv = FALSE;