From 7cf3657ba4fbf7304794dc30acda19b6527ede84 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 27 Aug 2025 16:42:58 +1200 Subject: [PATCH] fix --- esphome/components/split_buffer/split_buffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/split_buffer/split_buffer.cpp b/esphome/components/split_buffer/split_buffer.cpp index 763792f224..d092ba15f1 100644 --- a/esphome/components/split_buffer/split_buffer.cpp +++ b/esphome/components/split_buffer/split_buffer.cpp @@ -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_;