Merge pull request #2379 from dengert/Fix-new-line

log.c - fix newline - Fixes:#2378
This commit is contained in:
Frank Morgner 2021-08-09 14:52:41 +02:00 committed by GitHub
commit 7d315b5546
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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