Skip to content

Commit 1fd88cd

Browse files
committed
change int to unsigned int in IRrecvDumpV2
some larger values could overflow to negative numbers, with unsigned int (vs int)
1 parent 9b21a7f commit 1fd88cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/IRrecvDumpV2/IRrecvDumpV2.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void dumpRaw (decode_results *results)
9595
Serial.print(" -");
9696
Serial.println(results->rawbuf[0] * USECPERTICK, DEC);
9797
for (int i = 1; i < results->rawlen; i++) {
98-
int x = results->rawbuf[i] * USECPERTICK;
98+
unsigned int x = results->rawbuf[i] * USECPERTICK;
9999
if (!(i & 1)) { // even
100100
Serial.print("-");
101101
if (x < 1000) Serial.print(" ") ;

0 commit comments

Comments
 (0)