AP_Param: eedump_apparam fix accessing uninit var

This commit is contained in:
Joshua Henderson 2022-05-12 00:31:07 -04:00 committed by Andrew Tridgell
parent d2053d4449
commit d002fde67e
1 changed files with 1 additions and 1 deletions

View File

@ -119,8 +119,8 @@ main(int argc, char *argv[])
index = sizeof(*header);
for (;; ) {
uint8_t size;
const uint16_t key = ((uint16_t)var->key_high)<<8 | var->key_low;
var = (struct Param_header *)&eeprom[index];
const uint16_t key = ((uint16_t)var->key_high)<<8 | var->key_low;
if (key == _sentinal_key ||
var->type == _sentinal_type) {
printf("end sentinel at %u\n", index);