vt: Make a comparison <= for readability.
All other uses of vc_npar are inclusive (save for < NPAR) which raises eyebrows, so let's at least do so consistently. Signed-off-by: Adam Borowski <kilobyte@angband.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
669e0a51b1
commit
0bf1f4a8a3
|
@ -1312,7 +1312,7 @@ static int vc_t416_color(struct vc_data *vc, int i,
|
|||
if (i > vc->vc_npar)
|
||||
return i;
|
||||
|
||||
if (vc->vc_par[i] == 5 && i < vc->vc_npar) {
|
||||
if (vc->vc_par[i] == 5 && i + 1 <= vc->vc_npar) {
|
||||
/* 256 colours -- ubiquitous */
|
||||
i++;
|
||||
rgb_from_256(vc->vc_par[i], &c);
|
||||
|
|
Loading…
Reference in New Issue