summaryrefslogtreecommitdiffstats
path: root/src/misc2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-04-10 22:22:42 +0200
committerBram Moolenaar <Bram@vim.org>2017-04-10 22:22:42 +0200
commit478af67dd6a9adc456464c3736bda328ae3a28cb (patch)
treecba8ed52ec81c2416324d194c642179536f3e802 /src/misc2.c
parent451a4a1cb7797e5d9b9fd625671cb5c652e7da00 (diff)
patch 8.0.0561: undefined behavior when using backslash after empty linev8.0.0561
Problem: Undefined behavior when using backslash after empty line. Solution: Check for an empty line. (Dominique Pelle, closes #1631)
Diffstat (limited to 'src/misc2.c')
-rw-r--r--src/misc2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc2.c b/src/misc2.c
index 2f9fed57a4..fa06e47401 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -2129,7 +2129,7 @@ ga_concat(garray_T *gap, char_u *s)
{
int len;
- if (s == NULL)
+ if (s == NULL || *s == NUL)
return;
len = (int)STRLEN(s);
if (ga_grow(gap, len) == OK)