# HG changeset patch # User Bram Moolenaar # Date 1396630848 -7200 # Node ID 80421d934ebde183ce545ab8d9eb3a4c2065c169 # Parent 43fc7ea915dbfd380b89f479864e1f232f820469 updated for version 7.4.245 Problem: Crash for "vim -u NONE -N -c '&&'". Solution: Check for the pattern to be NULL. (Dominique Pelle) diff --git a/src/ex_cmds.c b/src/ex_cmds.c --- 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 == '#')))) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -735,6 +735,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 245, +/**/ 244, /**/ 243,