Description
For DEBUG_LOG it is required to add "\n" as per
static void doLogOutput(const char *buffer)
{
...
fprintf(theLogFile, "%s", buffer); // note, no \n (should be there already)
And for DEBUG_CRASH it is also required to add "\n", because it will also log out.
void DebugCrash(const char *format, ...)
{
...
format = prepBuffer(format, theCrashBuffer);
strcat(theCrashBuffer, "ASSERTION FAILURE: ");
va_list arg;
va_start(arg, format);
vsprintf(theCrashBuffer + strlen(theCrashBuffer), format, arg);
va_end(arg);
...
whackFunnyCharacters(theCrashBuffer);
doLogOutput(theCrashBuffer); // <----- xezon: will log here
This is not nice. Makes its use error prone. Some callers will and do forget to add a trailing \n to their strings.