mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
fix(coverity/508289): lookup_colour() dead code
Problem: Dead code due to CSI arg guard resulting in argcount never zero. Solution: Invert guard to avoid repeating return statements.
This commit is contained in:
parent
4c5bce9cb4
commit
9143c1f15b
@ -100,10 +100,7 @@ static int lookup_colour(const VTermState *state, int palette, const long args[]
|
||||
return 3;
|
||||
|
||||
case 5: // XTerm 256-colour mode
|
||||
if (!argcount || CSI_ARG_IS_MISSING(args[0])) {
|
||||
return argcount ? 1 : 0;
|
||||
}
|
||||
|
||||
if (argcount && !CSI_ARG_IS_MISSING(args[0]))
|
||||
vterm_color_indexed(col, args[0]);
|
||||
|
||||
return argcount ? 1 : 0;
|
||||
|
Loading…
Reference in New Issue
Block a user