Make carets line up in dtc diagnostics if the line starts with a tab.

This commit is contained in:
theraven 2013-08-14 14:34:02 +00:00
parent 8255307210
commit 70c59fcff4

View File

@ -216,7 +216,8 @@ input_buffer::parse_error(const char *msg)
putc('\n', stderr);
for (int i=0 ; i<(cursor-line_start) ; ++i)
{
putc(' ', stderr);
char c = (buffer[i+line_start] == '\t') ? '\t' : ' ';
putc(c, stderr);
}
putc('^', stderr);
putc('\n', stderr);