1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
commit 44449b305bcfa43233c7cc6f67b059414514c649
Author: nicm <nicm>
Date: Sun Oct 9 07:30:28 2016 +0000
Use xsnprintf not snprintf for the prompt in window_copy_write_line
because we don't care if it is truncated to the screen width, we don't
want it to be fatal.
--- a/window-copy.c
+++ b/window-copy.c
@@ -1288,7 +1288,8 @@
xoff = size = xsnprintf(hdr, limit,
"Repeat: %d", data->numprefix);
} else {
- xoff = size = xsnprintf(hdr, limit,
+ /* We don't care about truncation. */
+ xoff = size = snprintf(hdr, limit,
"%s: %s", data->inputprompt, data->inputstr);
}
screen_write_cursormove(ctx, 0, last);
|