diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-07-15 21:19:34 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-07-15 21:19:34 -0700 |
| commit | 26b683ca743755d1959269cdc15dbd38c4a89aa0 (patch) | |
| tree | 6b0fd681c67182deeba4b0d71ac7b0055128cdc5 /print.c | |
| parent | 7cd6117138ec08ca1af0ddf36185204bb719dd31 (diff) | |
Bugfix for NULL bytes in text
Diffstat (limited to 'print.c')
| -rw-r--r-- | print.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -216,7 +216,8 @@ static void print_between(FILE *out, printer_t *pr, const char *start, const cha fprintf(out, "%s", color); current_color = color; } - fprintf(out, "%.*s", (int)(eol - start), start); + for (const char *c = start; c < eol; c++) + fputc(*c, out); if (eol[-1] == '\n') pr->needs_line_number = 1; start = eol; |
