restore config page (the last page) protection from wiping

This commit is contained in:
ANTodorov 2024-11-17 23:56:40 +02:00
commit 51a94d6d51
No known key found for this signature in database
GPG key ID: 318CC11D7ED4016B

View file

@ -460,8 +460,8 @@ static int CmdFlashMemWipe(const char *Cmd) {
return res;
}
if (page < 0 || page > (spi_flash_pages - 1)) {
PrintAndLogEx(WARNING, "page must be between 0 and %d", spi_flash_pages - 1);
if (page < 0 || page > (spi_flash_pages - 2)) {
PrintAndLogEx(WARNING, "page must be between 0 and %d", spi_flash_pages - 2);
return PM3_EINVARG;
}