From c6f6cb781d5ad312fb4dadfd3df8f1a17dab77b6 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Tue, 14 Aug 2012 11:00:53 +0200 Subject: [PATCH] Keep the backslash if not followed by \n or \r\n when parsing --- fileio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fileio.c b/fileio.c index f1247c9..3b8bf3e 100644 --- a/fileio.c +++ b/fileio.c @@ -73,7 +73,12 @@ pkg_fgetline(char *line, size_t size, FILE *stream) break; } else + { + if (quoted) + *s++ = '\\'; *s++ = c; + } + } *s = '\0';