From 215e01e70f13f28d1a4dbe297f095b25de04ee21 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Thu, 28 Mar 2019 10:41:09 +0000 Subject: 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. --- libbb/parse_config.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libbb') 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) parser->lineno++; if (line[len - 1] == '\n') len--; +#if ENABLE_PLATFORM_MINGW32 + if (line[len - 1] == '\r') + len--; +#endif if (len == 0 || line[len - 1] != '\\') break; len--; -- cgit v1.2.3-55-g6feb