Fix detection of unknown flash-size when saving (#17)
diff --git a/main.cpp b/main.cpp index 76e5276..fae9203 100644 --- a/main.cpp +++ b/main.cpp
@@ -1615,7 +1615,7 @@ } } else { end = FLASH_START + guess_flash_size(raw_access); - if (end == 0) { + if (end <= FLASH_START) { fail(ERROR_NOT_POSSIBLE, "Cannot determine the flash size, so cannot save the entirety of flash, try --range."); } }