diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-05-17 21:21:32 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-05-17 21:21:32 +0000 |
commit | 81bf87379db78faa2dfbe0bbc91a60d04c51cc74 (patch) | |
tree | f66f5f8000c892eb2e78a51efc9100423ffa0cf6 /usr.bin/tmux/cfg.c | |
parent | 09ea0f518da2b03974cc0de926da59c81c7cd5a7 (diff) |
Ignore line continuation when escaped as \\, from Simon Nicolussi.
Diffstat (limited to 'usr.bin/tmux/cfg.c')
-rw-r--r-- | usr.bin/tmux/cfg.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/cfg.c b/usr.bin/tmux/cfg.c index a8ed42026a9..6f935622662 100644 --- a/usr.bin/tmux/cfg.c +++ b/usr.bin/tmux/cfg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cfg.c,v 1.13 2011/08/24 10:46:01 nicm Exp $ */ +/* $OpenBSD: cfg.c,v 1.14 2012/05/17 21:21:31 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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; |