mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Improved underlining errors/warnings when unicode is used. #2887
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
- Flag `--cpu-flags` doesn't work if the first item is an exclusion. #2905
|
||||
- Reallocating overaligned memory with the LibcAllocator was unsafe.
|
||||
- Using [] or .foo on $$ functions would not raise error but instead crash
|
||||
- Improved underlining errors/warnings when unicode is used. #2887
|
||||
|
||||
## 0.7.9 Change list
|
||||
|
||||
|
||||
@@ -141,14 +141,14 @@ static void print_error_type_at(SourceSpan location, const char *message, PrintT
|
||||
unsigned space_to = col_location ? col_location : max_lines_for_display - 1;
|
||||
for (unsigned i = 0; i < space_to - 1; i++)
|
||||
{
|
||||
switch (current[i])
|
||||
unsigned char c = (unsigned char)current[i];
|
||||
if (c == '\t')
|
||||
{
|
||||
case '\t':
|
||||
eprintf("\t");
|
||||
break;
|
||||
default:
|
||||
eprintf(" ");
|
||||
break;
|
||||
eprintf("\t");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (c < 128 || (c & 0xC0) == 0xC0) eprintf(" ");
|
||||
}
|
||||
}
|
||||
unsigned len = location.length;
|
||||
|
||||
Reference in New Issue
Block a user