mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-24 01:40:12 -05:00
render: use rounding for fractional scale
If we truncate the buffer dimensions we may accidentally submit a buffer with inappropriate size.
This commit is contained in:
parent
d1df98e0ca
commit
b7100d5716
4 changed files with 12 additions and 4 deletions
4
render.c
4
render.c
|
|
@ -3856,8 +3856,8 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
|
|||
scale = term->scale;
|
||||
}
|
||||
|
||||
width *= scale;
|
||||
height *= scale;
|
||||
width = round(width * scale);
|
||||
height = round(height * scale);
|
||||
|
||||
if (width == 0 && height == 0) {
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue