aboutsummaryrefslogtreecommitdiff
path: root/bootloaders
diff options
context:
space:
mode:
authorZach Eveland <zeveland@blacklabel-development.com>2012-01-10 16:00:46 -0500
committerZach Eveland <zeveland@blacklabel-development.com>2012-01-10 16:00:46 -0500
commit0ea882bc247b3cca8788f329d9fe802107fa8960 (patch)
treeb23a705e228ef2f46a07e97fb10423c2e66ac47b /bootloaders
parent94443a2a7700976c148843c2bb7d46e05744cff8 (diff)
fixed warning when comparing pgm_read_word(0) to -1 (thanks, Limor Fried and Phillip Torrone)
Diffstat (limited to 'bootloaders')
-rw-r--r--bootloaders/diskloader/src/DiskLoader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/bootloaders/diskloader/src/DiskLoader.cpp b/bootloaders/diskloader/src/DiskLoader.cpp
index d14c7fb..7ef6fa8 100644
--- a/bootloaders/diskloader/src/DiskLoader.cpp
+++ b/bootloaders/diskloader/src/DiskLoader.cpp
@@ -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(;;)