fix: shifting signed 32-bit value by 31 bits is undefined behaviour

This commit is contained in:
Philippe Teuwen 2019-03-12 23:59:43 +01:00
commit d9308d912d
4 changed files with 7 additions and 7 deletions

View file

@ -191,7 +191,7 @@ int CmdTIDemod(const char *Cmd) {
bits[i] = '1';
maxPos += highLen;
// bitstream arrives lsb first so shift right
shift3 |= (1 << 31);
shift3 |= (1u << 31);
} else {
bits[i] = '.';
maxPos += lowLen;