summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--support/popt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/support/popt.c b/support/popt.c
index bc24b9b..d4dee02 100644
--- a/support/popt.c
+++ b/support/popt.c
@@ -451,7 +451,8 @@ int poptReadConfigFile(poptContext con, char * fn) {
*dst++ = *chptr++;
if (chptr < end) {
if (*chptr == '\n')
- *(dst - 1) = *chptr++;
+ dst--, chptr++;
+ /* \ at the end of a line does not insert a \n */
else
*dst++ = *chptr++;
}