diff options
-rw-r--r-- | common.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -8,7 +8,6 @@ indicate_file_area(FILE* fd, size_t line, size_t column, size_t span) { char buf[1024] = { '\0' }; char *s = buf; - char *line_start = buf; rewind(fd); while (line && !feof(fd) && fgets(buf, sizeof(buf), fd)) { @@ -20,12 +19,13 @@ indicate_file_area(FILE* fd, size_t line, size_t column, size_t span) { } } - while (*line_start == '\t' || *line_start == ' ') { - line_start++; + s = buf; + while (*s == '\t' || *s == ' ') { + s++; } fputs(margin, stderr); - fputs(line_start, stderr); + fputs(s, stderr); /* corner case (still needed?) - buf was just return */ if (strlen(buf) == 1 && buf[0] == '\n') { |