1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +01:00

fixed warning when comparing pgm_read_word(0) to -1 (thanks, Limor Fried and Phillip Torrone)

This commit is contained in:
Zach Eveland 2012-01-10 16:00:46 -05:00
parent e3b89d178d
commit 48ed974834

View File

@ -117,7 +117,7 @@ int main()
TX_LED_OFF();
RX_LED_OFF();
L_LED_OFF();
if (MCUSR_state & (1<<WDRF) && (pgm_read_word(0) != -1)) {
if (MCUSR_state & (1<<WDRF) && (pgm_read_word(0) != 0xFFFF)) {
StartSketch(); // if the reset was caused by WDT and if a sketch is already present then run the sketch instead of the bootloader
}
BOARD_INIT();
@ -126,7 +126,7 @@ int main()
_inSync = STK_INSYNC;
_ok = STK_OK;
if (pgm_read_word(0) != -1)
if (pgm_read_word(0) != 0xFFFF)
_ejected = 1;
for(;;)