Fix log buffer eot mark location

This commit is contained in:
Theo Arends 2020-12-17 17:41:53 +01:00
parent abdfae5046
commit e2ec826dec

View File

@ -1972,7 +1972,7 @@ void AddLog(uint32_t loglevel)
TasmotaGlobal.web_log_index++; // Index 0 is not allowed as it is the end of char string
}
while (TasmotaGlobal.web_log_index == TasmotaGlobal.web_log[0] || // If log already holds the next index, remove it
strlen(TasmotaGlobal.web_log) + strlen(TasmotaGlobal.log_data) + 13 > WEB_LOG_SIZE) // 13 = web_log_index + mxtime + '\1' + '\0'
strlen(TasmotaGlobal.web_log) + strlen(TasmotaGlobal.log_data) + strlen(mxtime) + 4 > WEB_LOG_SIZE) // 4 = web_log_index + '\1' + '\0'
{
char* it = TasmotaGlobal.web_log;
it++; // Skip web_log_index