From ac7e2f13e999c1f24b58f7db868c7faeeb0a3c0e Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 17 May 2012 21:21:31 +0000 Subject: Ignore line continuation when escaped as \\, from Simon Nicolussi. --- cfg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cfg.c') diff --git a/cfg.c b/cfg.c index d49bfa61..22a50d22 100644 --- a/cfg.c +++ b/cfg.c @@ -109,7 +109,9 @@ load_cfg(const char *path, struct cmd_ctx *ctxin, struct causelist *causes) len = strlen(line); if (len > 0 && line[len - 1] == '\\') { line[len - 1] = '\0'; - continue; + /* Ignore escaped backslash at EOL. */ + if (len > 1 && line[len - 2] != '\\') + continue; } buf = line; line = NULL; -- cgit