aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2019-03-28 10:41:09 +0000
committerRon Yorston <rmy@pobox.com>2019-03-28 10:41:09 +0000
commit215e01e70f13f28d1a4dbe297f095b25de04ee21 (patch)
tree8d5f945d6a756afbf552fe5ec94f6a11e2c5e6b6 /libbb
parent7018ba917db63c493918af0a5bf2977480d52bc7 (diff)
downloadbusybox-w32-215e01e70f13f28d1a4dbe297f095b25de04ee21.tar.gz
busybox-w32-215e01e70f13f28d1a4dbe297f095b25de04ee21.tar.bz2
busybox-w32-215e01e70f13f28d1a4dbe297f095b25de04ee21.zip
man: proper handling of default path and config file
Don't overwrite the default path when the path relative to the executable is added. Remove trailing carriage returns when parsing the configuration file.
Diffstat (limited to 'libbb')
-rw-r--r--libbb/parse_config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libbb/parse_config.c b/libbb/parse_config.c
index 8701b010c..f7a2b81b9 100644
--- a/libbb/parse_config.c
+++ b/libbb/parse_config.c
@@ -115,6 +115,10 @@ static int get_line_with_continuation(parser_t *parser)
115 parser->lineno++; 115 parser->lineno++;
116 if (line[len - 1] == '\n') 116 if (line[len - 1] == '\n')
117 len--; 117 len--;
118#if ENABLE_PLATFORM_MINGW32
119 if (line[len - 1] == '\r')
120 len--;
121#endif
118 if (len == 0 || line[len - 1] != '\\') 122 if (len == 0 || line[len - 1] != '\\')
119 break; 123 break;
120 len--; 124 len--;