Fix missed rename: reason[0] -> REASON[0] in sizeof expressions

Co-Authored-By: J. Nick Koston <nick@koston.org>
This commit is contained in:
J. Nick Koston
2026-03-11 12:39:55 -10:00
co-authored by J. Nick Koston
parent 147eae4b36
commit 35801d795a
+2 -2
View File
@@ -161,7 +161,7 @@ static const char *get_exception_reason() {
"StoreProhibited",
};
uint32_t cause = s_raw_crash_data.cause;
if (cause < sizeof(REASON) / sizeof(reason[0]) && REASON[cause] != nullptr)
if (cause < sizeof(REASON) / sizeof(REASON[0]) && REASON[cause] != nullptr)
return REASON[cause];
#elif CONFIG_IDF_TARGET_ARCH_RISCV
// For SoC-level panics (watchdog, cache error), mcause holds IDF-internal
@@ -188,7 +188,7 @@ static const char *get_exception_reason() {
"Store page fault",
};
uint32_t cause = s_raw_crash_data.cause;
if (cause < sizeof(REASON) / sizeof(reason[0]) && REASON[cause] != nullptr)
if (cause < sizeof(REASON) / sizeof(REASON[0]) && REASON[cause] != nullptr)
return REASON[cause];
#endif
return "Unknown";