diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-04-04 19:00:48 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-04-04 19:00:48 +0200 |
commit | 21e854e5ce08ad419441136b1698d535ff818a72 (patch) | |
tree | 5cbca036aea3034ba98b6be75a35caeb0525df62 /src/ex_cmds.c | |
parent | 57a728d1df7451f5b2b6b1f933182b5af9513d83 (diff) | |
download | vim-git-21e854e5ce08ad419441136b1698d535ff818a72.tar.gz |
updated for version 7.4.245v7.4.245
Problem: Crash for "vim -u NONE -N -c '&&'".
Solution: Check for the pattern to be NULL. (Dominique Pelle)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 5321955cf..7ae4917a8 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -4425,7 +4425,7 @@ do_sub(eap) * TODO: find a generic solution to make line-joining operations more * efficient, avoid allocating a string that grows in size. */ - if (STRCMP(pat, "\\n") == 0 && STRLEN(pat) == 2 + if (pat != NULL && STRCMP(pat, "\\n") == 0 && *sub == NUL && (*cmd == NUL || (cmd[1] == NUL && (*cmd == 'g' || *cmd == 'l' || *cmd == 'p' || *cmd == '#')))) |