eval: Fix V507

This commit is contained in:
ZyX
2017-05-20 03:51:19 +03:00
parent 98baea63ff
commit d9239181af

View File

@@ -21094,9 +21094,9 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars,
// Do not want errors such as E724 here. // Do not want errors such as E724 here.
emsg_off++; emsg_off++;
char *tofree = encode_tv2string(&argvars[i], NULL); char *tofree = encode_tv2string(&argvars[i], NULL);
char *s = tofree;
emsg_off--; emsg_off--;
if (s != NULL) { if (tofree != NULL) {
char *s = tofree;
char buf[MSG_BUF_LEN]; char buf[MSG_BUF_LEN];
if (vim_strsize((char_u *)s) > MSG_BUF_CLEN) { if (vim_strsize((char_u *)s) > MSG_BUF_CLEN) {
trunc_string((char_u *)s, (char_u *)buf, MSG_BUF_CLEN, trunc_string((char_u *)s, (char_u *)buf, MSG_BUF_CLEN,