termptyesc: randomize new entry in the true color cache

This commit is contained in:
Boris Faure 2020-05-09 00:04:20 +02:00
parent b088592f79
commit 876036f009
Signed by: borisfaure
GPG Key ID: 35C0410516166BE8
1 changed files with 2 additions and 1 deletions

View File

@ -715,7 +715,8 @@ _tcc_insert(const uint32_t color_msb, const uint8_t approximated)
uint32_t c = color_msb | approximated;
int i;
i = (TCC_LEN / 2) + ((_tcc_random_pos + TCC_PRIME) % (TCC_LEN / 2));
_tcc_random_pos = ((_tcc_random_pos + TCC_PRIME) % (TCC_LEN / 2));
i = (TCC_LEN / 2) + _tcc_random_pos;
_truecolor_cache.colors[i] = c;
}