diff options
author | Nikolai Aleksandrovich Pavlov <kp-pav@yandex.ru> | 2017-08-13 18:37:35 +0300 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-08-13 17:37:35 +0200 |
commit | bf1b1ea6eebf254ed975b743241a598c6aeeb132 (patch) | |
tree | 27c7a15fa1cef1dcee60dd7785bc23dceaf43b7b /src/nvim/lua/executor.c | |
parent | 1f9c139fd3a060924daf8ce1df32fc3204c6231d (diff) | |
download | rneovim-bf1b1ea6eebf254ed975b743241a598c6aeeb132.tar.gz rneovim-bf1b1ea6eebf254ed975b743241a598c6aeeb132.tar.bz2 rneovim-bf1b1ea6eebf254ed975b743241a598c6aeeb132.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 *)""); } } |