Debug module only outputs full lines instead of parts

This commit is contained in:
Paul Bakker 2014-04-25 15:18:34 +02:00
parent eaebbd5eaa
commit 92478c37a6
3 changed files with 36 additions and 25 deletions

View file

@ -14,6 +14,13 @@ void string_debug(void *data, int level, const char *str)
memcpy(buffer->ptr, str, strlen(str));
buffer->ptr += strlen(str);
/* Detect if debug messages output partial lines and mark them */
if( *(buffer->ptr - 1) != '\n' )
{
*buffer->ptr = '*';
buffer->ptr++;
}
}
/* END_HEADER */