Skip to content

Commit

Permalink
Fix detection of unknown flash-size when saving (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
lurch authored Apr 24, 2021
1 parent 8d4b1d3 commit a49dc0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,7 @@ void save_command::execute(device_map &devices) {
}
} 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.");
}
}
Expand Down

0 comments on commit a49dc0b

Please sign in to comment.