summaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2022-03-19 12:56:51 +0000
committerBram Moolenaar <Bram@vim.org>2022-03-19 12:56:51 +0000
commit36a5b6867bb6c0bd69c8da7d788000ab8a0b0ab0 (patch)
treefbf0b74c593ab218dc3c66856d13edb2695128b1 /src/alloc.c
parent95d2e7634ccd8e0da78086002509a856999e180c (diff)
patch 8.2.4594: need to write script to a file to be able to source themv8.2.4594
Problem: Need to write script to a file to be able to source them. Solution: Make ":source" use lines from the current buffer. (Yegappan Lakshmanan et al., closes #9967)
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 19f8fcd674..e6e2633d21 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -845,7 +845,7 @@ ga_concat(garray_T *gap, char_u *s)
void
ga_concat_len(garray_T *gap, char_u *s, size_t len)
{
- if (s == NULL || *s == NUL)
+ if (s == NULL || *s == NUL || len == 0)
return;
if (ga_grow(gap, (int)len) == OK)
{