mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 10:18:18 +00:00
lua/executor: Fix crash when printing empty string (#7157)
This commit is contained in:

committed by
Justin M. Keyes

parent
1f9c139fd3
commit
bf1b1ea6ee
@@ -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 *)"");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user