Fix coding error in send loops (specify bit size of literal)

This commit is contained in:
Bluechip
2015-07-01 20:06:51 +01:00
parent 4e5608f25f
commit ec5e1bd5f9
12 changed files with 14 additions and 14 deletions

View File

@@ -29,7 +29,7 @@ void IRsend::sendSony (unsigned long data, int nbits)
space(SONY_HDR_SPACE);
// Data
for (unsigned long mask = 1 << (nbits - 1); mask; mask >>= 1) {
for (unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) {
if (data & mask) {
mark(SONY_ONE_MARK);
space(SONY_HDR_SPACE);