mirror of
https://github.com/esphome/esphome.git
synced 2026-09-16 09:38:42 +00:00
Fix missed rename: reason[0] -> REASON[0] in sizeof expressions
Co-Authored-By: J. Nick Koston <nick@koston.org>
This commit is contained in:
co-authored by
J. Nick Koston
parent
147eae4b36
commit
35801d795a
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user