termptyesc: randomize new entry in the true color cache

terminology-1.7
Boris Faure 3 years ago
parent b088592f79
commit 876036f009
Signed by: borisfaure
GPG Key ID: 35C0410516166BE8
  1. 3
      src/bin/termptyesc.c

@ -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;
}

Loading…
Cancel
Save