mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
coverity/13746: Negative array index write: FP.
Problem : Negative array index write @ 1042. Diagnostic : False positive. Rationale : Suggested error path cannot occur: idx should be >= 0, as previous check ensures there's a matching while/for. Resolution : Assert idx >= 0.
This commit is contained in:
parent
24fa25a57f
commit
a4bed17d0d
@ -1028,7 +1028,8 @@ void ex_continue(exarg_T *eap)
|
||||
* next). Therefor, inactivate all conditionals except the ":while"
|
||||
* itself (if reached). */
|
||||
idx = cleanup_conditionals(cstack, CSF_WHILE | CSF_FOR, FALSE);
|
||||
if (idx >= 0 && (cstack->cs_flags[idx] & (CSF_WHILE | CSF_FOR))) {
|
||||
assert(idx >= 0);
|
||||
if (cstack->cs_flags[idx] & (CSF_WHILE | CSF_FOR)) {
|
||||
rewind_conditionals(cstack, idx, CSF_TRY, &cstack->cs_trylevel);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user