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:
gambas 2021-03-05 17:14:21 +01:00
parent e8c713eef3
commit 47ce384c8b

View file

@ -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");