[ansi-print] Fix unicolor detection
This commit is contained in:
parent
a4db80ca0a
commit
2ebaf0c5ba
|
@ -175,9 +175,9 @@ struct biimage_t
|
||||||
for (unsigned int i = 1; i < 8; i++)
|
for (unsigned int i = 1; i < 8; i++)
|
||||||
if (freq[bg] < freq[i])
|
if (freq[bg] < freq[i])
|
||||||
bg = i;
|
bg = i;
|
||||||
fg = 0;
|
fg = 8;
|
||||||
for (unsigned int i = 1; i < 8; i++)
|
for (unsigned int i = 0; i < 8; i++)
|
||||||
if (i != bg && freq[fg] < freq[i])
|
if (i != bg && (fg == 8 || freq[fg] < freq[i]))
|
||||||
fg = i;
|
fg = i;
|
||||||
if (fg == bg || freq[fg] == 0) {
|
if (fg == bg || freq[fg] == 0) {
|
||||||
fg = bg;
|
fg = bg;
|
||||||
|
|
Loading…
Reference in New Issue