mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
vim-patch:8.2.0112: illegal memory access when using 'cindent'
Problem: Illegal memory access when using 'cindent'.
Solution: Check for NUL byte. (Dominique Pelle, closes vim/vim#5470)
02ad46394e
This commit is contained in:
@@ -461,6 +461,9 @@ cin_iscase (
|
||||
if (cin_starts_with(s, "case")) {
|
||||
for (s += 4; *s; ++s) {
|
||||
s = cin_skipcomment(s);
|
||||
if (*s == NUL) {
|
||||
break;
|
||||
}
|
||||
if (*s == ':') {
|
||||
if (s[1] == ':') /* skip over "::" for C++ */
|
||||
++s;
|
||||
|
Reference in New Issue
Block a user