aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorerikarvstedt <36110478+erikarvstedt@users.noreply.github.com>2022-02-14 11:14:50 +0100
committerGitHub <noreply@github.com>2022-02-14 12:14:50 +0200
commit8ed792b640ef3601dfb773d670915d74fbbbad13 (patch)
tree8f5060f3d06d23275ebb2852a25bdf9dc3defb81 /src
parent9ca3c897ec546bc08eefe53471c995deefc9f36d (diff)
downloadzig-8ed792b640ef3601dfb773d670915d74fbbbad13.tar.gz
zig-8ed792b640ef3601dfb773d670915d74fbbbad13.zip
std.Progress: fix suffix printing
Previously, `suffix` was copied to `output_buffer` at position `max_end`, thereby writing into reserved space after `max_end`. This only worked because `suffix` was not larger than `bytes_needed_for_esc_codes_at_end` (otherwise there'd be a potential buffer overrun) and no escape codes at end are actually written. Since 2d5b2bf1c986d037ef965bf8c9b4d8dfd5967478, escape codes are no longer written to the end of the buffer. They are now written exclusively to the front of the buffer. This allows removing `bytes_needed_for_esc_codes_at_end` and simplifying the suffix printing logic. This also fixes the bug that the ellipse suffix was not printed in Windows terminals because `end.* > max_end` was never true.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions