aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/cursor_shape.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-09-10 20:15:44 -0700
committerGitHub <noreply@github.com>2019-09-10 20:15:44 -0700
commitb735583377bf5c15a7bd5e910e4ae9fa833c1e42 (patch)
treec2a33c7597b8122aeae26b82fa759d11efa3aa84 /src/nvim/cursor_shape.c
parent7bb858c39cac9b9af321fc90470c91d2e31ed96e (diff)
parent2ed7cda8cd0fe7dd29fa7879a7bf6df9256d38cd (diff)
downloadrneovim-b735583377bf5c15a7bd5e910e4ae9fa833c1e42.tar.gz
rneovim-b735583377bf5c15a7bd5e910e4ae9fa833c1e42.tar.bz2
rneovim-b735583377bf5c15a7bd5e910e4ae9fa833c1e42.zip
Merge #10969 from janlazo/clang_pvs
Diffstat (limited to 'src/nvim/cursor_shape.c')
-rw-r--r--src/nvim/cursor_shape.c6
1 files changed, 3 insertions, 3 deletions
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++;
+ }
}
}