Modifies the argument of the sizeof statement to a legitimate array name

This commit is contained in:
wen13245 2023-04-21 18:44:06 +08:00 committed by GitHub
parent df9310ada2
commit ffa79a4b4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ int esp_sysview_vprintf(const char * format, va_list args)
portENTER_CRITICAL(&s_log_mutex);
size_t len = vsnprintf(log_buffer, sizeof(log_buffer), format, args);
if (len > sizeof(log_buffer) - 1) {
log_buffer[sizeof(log_buffer - 1)] = 0;
log_buffer[sizeof(log_buffer) - 1] = 0;
}
SEGGER_SYSVIEW_Print(log_buffer);
portEXIT_CRITICAL(&s_log_mutex);