Skip to content
This repository was archived by the owner on Oct 5, 2021. It is now read-only.

Commit 7683db8

Browse files
committed
Allow specifying more than 255 pages to erase
https://sourceforge.net/p/stm32flash/tickets/91/ Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
1 parent 033aaa8 commit 7683db8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ int parse_options(int argc, char *argv[])
690690
return 1;
691691
}
692692
npages = strtoul(optarg, NULL, 0);
693-
if (npages > 0xFF || npages < 0) {
693+
if (npages > STM32_MAX_PAGES || npages < 0) {
694694
fprintf(stderr, "ERROR: You need to specify a page count between 0 and 255");
695695
return 1;
696696
}

0 commit comments

Comments
 (0)