aboutsummaryrefslogtreecommitdiff
path: root/cfg.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-05-22 20:50:51 +0000
committerTiago Cunha <tcunha@gmx.com>2012-05-22 20:50:51 +0000
commit04bf0d8efc25d7e40fc034db0f2546cf8a09cfda (patch)
treef1cea02aa6608b36e35da53b420dfba66047a839 /cfg.c
parent3604b31b6f1deb996102f5e8767818b6dcf2d582 (diff)
downloadrtmux-04bf0d8efc25d7e40fc034db0f2546cf8a09cfda.tar.gz
rtmux-04bf0d8efc25d7e40fc034db0f2546cf8a09cfda.tar.bz2
rtmux-04bf0d8efc25d7e40fc034db0f2546cf8a09cfda.zip
Sync OpenBSD patchset 1113:
Ignore line continuation when escaped as \\, from Simon Nicolussi.
Diffstat (limited to 'cfg.c')
-rw-r--r--cfg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cfg.c b/cfg.c
index 459e8620..4d6a45c9 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;