log.c - fix newline - Fixes:#2378

On branch Fix-new-line
 Changes to be committed:
	modified:   log.c
This commit is contained in:
Doug Engert 2021-08-06 13:53:49 -05:00
parent b67261ab27
commit 4c923c637c
1 changed files with 2 additions and 0 deletions

View File

@ -143,6 +143,8 @@ static void sc_do_log_va(sc_context_t *ctx, int level, const char *file, int lin
}
sc_color_fprintf_va(color, ctx, ctx->debug_file, format, args);
if (strlen(format) == 0 || format[strlen(format) - 1] != '\n')
sc_color_fprintf(color, ctx, ctx->debug_file, "\n");
fflush(ctx->debug_file);
#ifdef _WIN32