This commit is contained in:
merlokk 2022-07-18 16:22:52 +03:00
parent e33e99e268
commit c8b5ddc0fc

View file

@ -309,7 +309,7 @@ static bool TexcomTK15Decode(uint32_t *implengths, uint32_t implengthslen, char
if (implengthslen > 2 && implengthslen % 2 != 0) { if (implengthslen > 2 && implengthslen % 2 != 0) {
int lastimplen = implengths[implengthslen - 1]; int lastimplen = implengths[implengthslen - 1];
bool prevbit = (implengths[implengthslen - 3] > implengths[implengthslen - 2]); bool prevbit = (implengths[implengthslen - 3] > implengths[implengthslen - 2]);
bool thesamebit = (abs(lastimplen - implengths[implengthslen - 3]) < abs(lastimplen - implengths[implengthslen - 2])); bool thesamebit = (abs(lastimplen - (int)implengths[implengthslen - 3]) < abs(lastimplen - (int)implengths[implengthslen - 2]));
if (prevbit ^ !thesamebit) { if (prevbit ^ !thesamebit) {
strcat(bitstring, "10"); strcat(bitstring, "10");