mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 07:18:17 +00:00
cursor_shape: check if modep is nonnull
This commit is contained in:
@@ -118,7 +118,6 @@ char_u *parse_shape_opt(int what)
|
|||||||
// Repeat for all modes before the colon.
|
// Repeat for all modes before the colon.
|
||||||
// For the 'a' mode, we loop to handle all the modes.
|
// For the 'a' mode, we loop to handle all the modes.
|
||||||
all_idx = -1;
|
all_idx = -1;
|
||||||
assert(modep < colonp);
|
|
||||||
while (modep < colonp || all_idx >= 0) {
|
while (modep < colonp || all_idx >= 0) {
|
||||||
if (all_idx < 0) {
|
if (all_idx < 0) {
|
||||||
// Find the mode
|
// Find the mode
|
||||||
@@ -230,8 +229,9 @@ char_u *parse_shape_opt(int what)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
modep = p;
|
modep = p;
|
||||||
if (*modep == ',')
|
if (modep != NULL && *modep == ',') {
|
||||||
++modep;
|
modep++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user