From b8a338ee6a51c64e15ef3c66bcc67320e53cd6aa Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 8 Sep 2019 12:32:49 -0400 Subject: cursor_shape: check if modep is nonnull --- src/nvim/cursor_shape.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/nvim/cursor_shape.c b/src/nvim/cursor_shape.c index 0377cb97e5..96ff1e5631 100644 --- a/src/nvim/cursor_shape.c +++ b/src/nvim/cursor_shape.c @@ -118,7 +118,6 @@ char_u *parse_shape_opt(int what) // Repeat for all modes before the colon. // For the 'a' mode, we loop to handle all the modes. all_idx = -1; - assert(modep < colonp); while (modep < colonp || all_idx >= 0) { if (all_idx < 0) { // Find the mode @@ -230,8 +229,9 @@ char_u *parse_shape_opt(int what) } } modep = p; - if (*modep == ',') - ++modep; + if (modep != NULL && *modep == ',') { + modep++; + } } } -- cgit