Skip to content

Commit

Permalink
Update log.h
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius authored Jul 12, 2024
1 parent 98779df commit 1bfdc54
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ inline void Log_func(bool debug, const char* const msg, ...)
{
static int count = 1;
char buffer[512];

va_list args;
va_start(args, msg);
vsnprintf(buffer, 512, msg, args);
va_end(args);

if (debug)
{
printf("%d: [DEBUG] %s\n", count, buffer);
count++;
}
else
printf("%s\n", buffer);

fflush(stdout);

count++;
}

#endif /* LOG_H */

0 comments on commit 1bfdc54

Please sign in to comment.