diff --git a/sonoff/support.ino b/sonoff/support.ino index 3198cf7cb..f49304884 100644 --- a/sonoff/support.ino +++ b/sonoff/support.ino @@ -1557,7 +1557,7 @@ void AddLogBuffer(uint32_t loglevel, uint8_t *buffer, uint32_t count) ToHex_P(buffer, count, log_data + strlen(log_data), sizeof(log_data) - strlen(log_data), ' '); AddLog(loglevel); */ - char hex_char[count * 3]; + char hex_char[(count * 3) + 2]; AddLog_P2(loglevel, PSTR("DMP: %s"), ToHex_P(buffer, count, hex_char, sizeof(hex_char), ' ')); }