summaryrefslogtreecommitdiff
path: root/src/userfunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/userfunc.c')
-rw-r--r--src/userfunc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/userfunc.c b/src/userfunc.c
index ffc67eab4..052923e94 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -543,7 +543,7 @@ make_ufunc_name_readable(char_u *name, char_u *buf, size_t bufsize)
if (len + 3 > bufsize)
return name;
- mch_memmove(buf + 5, name + 3, len + 1);
+ mch_memmove(buf + 5, name + 3, len - 2); // Include trailing NUL
mch_memmove(buf, "<SNR>", 5);
return buf;
}