1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-03 18:42:23 +01:00
This commit is contained in:
J. Nick Koston
2025-10-01 03:59:43 +02:00
parent 4a3475f94d
commit e7b2cdd03c

View File

@@ -324,6 +324,7 @@ class Logger : public Component {
inline void HOT write_header_to_buffer_(uint8_t level, const char *tag, int line, const char *thread_name, inline void HOT write_header_to_buffer_(uint8_t level, const char *tag, int line, const char *thread_name,
char *buffer, uint16_t *buffer_at, uint16_t buffer_size) { char *buffer, uint16_t *buffer_at, uint16_t buffer_size) {
uint16_t pos = *buffer_at; uint16_t pos = *buffer_at;
// Early return if insufficient space - intentionally don't update buffer_at to prevent partial writes
if (pos + MAX_HEADER_SIZE > buffer_size) if (pos + MAX_HEADER_SIZE > buffer_size)
return; return;