Tabs and newlines are now replaced by spaces inside error messages. Otherwise the debugger breaks.
[GB.DEBUG] * BUG: Tabs and newlines are now replaced by spaces inside error messages. Otherwise the debugger breaks.
This commit is contained in:
parent
e8c713eef3
commit
47ce384c8b
1 changed files with 16 additions and 1 deletions
|
@ -683,10 +683,25 @@ void DEBUG_backtrace(FILE *out)
|
|||
|
||||
static void debug_info()
|
||||
{
|
||||
const char *p;
|
||||
char c;
|
||||
|
||||
fprintf(_out, "*[%d]\t", getpid());
|
||||
|
||||
if (_error)
|
||||
fputs(_error, _out);
|
||||
{
|
||||
p = _error;
|
||||
for(;;)
|
||||
{
|
||||
c = *p++;
|
||||
if (!c)
|
||||
break;
|
||||
|
||||
if (c == '\n' || c == '\r' || c == '\t')
|
||||
c = ' ';
|
||||
fputc(c, _out);
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(_out, "\t");
|
||||
|
||||
|
|
Loading…
Reference in a new issue