diff options
author | Nikolai Aleksandrovich Pavlov <kp-pav@yandex.ru> | 2017-08-13 18:37:35 +0300 |
---|---|---|
committer | ckelsel <ckelsel@hotmail.com> | 2017-08-14 07:45:50 +0800 |
commit | d0cb175cab56da47fbd08e4b65ca02832a93bc38 (patch) | |
tree | abe9a99bbc1960674b421a5ff034a46ae86f722d /src/nvim/lua/executor.c | |
parent | e6c528d9fc527d555a85ae12dc6cc8b74ab09e38 (diff) | |
download | rneovim-d0cb175cab56da47fbd08e4b65ca02832a93bc38.tar.gz rneovim-d0cb175cab56da47fbd08e4b65ca02832a93bc38.tar.bz2 rneovim-d0cb175cab56da47fbd08e4b65ca02832a93bc38.zip |
lua/executor: Fix crash when printing empty string (#7157)
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r-- | src/nvim/lua/executor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 9ec5bfb8ad..eb821f7831 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -519,7 +519,7 @@ static int nlua_print(lua_State *const lstate) } msg((char_u *)str + start); } - if (str[len - 1] == NUL) { // Last was newline + if (len && str[len - 1] == NUL) { // Last was newline msg((char_u *)""); } } |