1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 10:52:19 +01:00
This commit is contained in:
Jesse Hills
2025-08-27 16:42:58 +12:00
parent d272a668ff
commit 7cf3657ba4

View File

@@ -106,8 +106,8 @@ uint8_t &SplitBuffer::operator[](size_t index) {
if (index >= this->total_length_) {
ESP_LOGE(TAG, "SplitBuffer index %zu out of bounds (size: %zu)", index, this->total_length_);
// Return reference to a static dummy byte to avoid crash
static uint8_t DUMMY = 0;
return DUMMY;
static uint8_t dummy = 0;
return dummy;
}
size_t buffer_index = index / this->buffer_size_;