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
1 changed files with 2 additions and 2 deletions

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(;;)