mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
coverity/13750: Negative array index read: FP.
Problem : Negative array index read @ 909. Diagnostic : False positive. Rationale : Suggested error path assigns a negative value to idx at line 836 (`idx = find_command(ca.cmdchar);`). That's impossible, as `ca.cmdchar` is set to Ctrl_BSL just two lines above, so we know that value will be in the table. Resolution : Assert idx >= 0.
This commit is contained in:
parent
4d70aae770
commit
828a18722c
@ -834,6 +834,7 @@ getcount:
|
||||
ca.cmdchar = Ctrl_BSL;
|
||||
ca.nchar = c;
|
||||
idx = find_command(ca.cmdchar);
|
||||
assert(idx >= 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user