mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
render: oops... swprintf() needs to number of *chars*, not *bytes*
This commit is contained in:
parent
6e0171ee44
commit
823a7c0318
1 changed files with 1 additions and 1 deletions
2
render.c
2
render.c
|
|
@ -1491,7 +1491,7 @@ render_render_timer(struct terminal *term, struct timeval render_time)
|
|||
|
||||
wchar_t text[256];
|
||||
double usecs = render_time.tv_sec * 1000000 + render_time.tv_usec;
|
||||
swprintf(text, sizeof(text), L"%.2f µs", usecs);
|
||||
swprintf(text, sizeof(text) / sizeof(text[0]), L"%.2f µs", usecs);
|
||||
|
||||
const int cell_count = wcslen(text);
|
||||
const int margin = 3 * term->scale;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue