diff --git a/src/nvim/runtime.c b/src/nvim/runtime.c index 35b48b3ada..47e1feface 100644 --- a/src/nvim/runtime.c +++ b/src/nvim/runtime.c @@ -222,7 +222,7 @@ char *estack_sfile(estack_arg_T which) // . Also leave it out when the number is not set. if (lnum != 0) { ga.ga_len += (int)vim_snprintf_safelen((char *)ga.ga_data + ga.ga_len, - len - (size_t)ga.ga_len, + (size_t)(ga.ga_maxlen - ga.ga_len), "[%" PRIdLINENR "]", lnum); } if (idx != exestack.ga_len - 1) {