Skip to content

Commit 3003f8d

Browse files
authored
Fix OTP get/list for row 1 (#297)
The last_reg_row variable was not being initialised to an invalid value
1 parent 0d46096 commit 3003f8d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7669,7 +7669,7 @@ bool otp_get_command::execute(device_map &devices) {
76697669
picoboot_memory_access raw_access(con);
76707670
auto model = raw_access.get_model();
76717671
auto matches = filter_otp(settings.otp.selectors, otp_cmd_max_bits(), settings.otp.fuzzy);
7672-
uint32_t last_reg_row = 1; // invalid
7672+
uint32_t last_reg_row = UINT32_MAX; // invalid
76737673
bool first = true;
76747674
char buf[512];
76757675
uint32_t raw_buffer[OTP_PAGE_ROWS];
@@ -8018,7 +8018,7 @@ bool otp_list_command::execute(device_map &devices) {
80188018
init_otp(otp_regs, settings.otp.extra_files);
80198019

80208020
auto matches = filter_otp(settings.otp.selectors.empty() ? std::vector<string>({":"}) : settings.otp.selectors, 24, true);
8021-
uint32_t last_reg_row = 1; // invalid
8021+
uint32_t last_reg_row = UINT32_MAX; // invalid
80228022
bool first = true;
80238023
char buf[512];
80248024
int indent0 = settings.otp.list_pages ? 18 : 8;

0 commit comments

Comments
 (0)