diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-11-30 12:37:43 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-12-01 12:14:18 -0800 |
commit | f50deea84933330010f7ce8bf5d0a8139c452490 (patch) | |
tree | d3eace323fb14b917ded7d4df47c108111c1b7e6 /src | |
parent | 878514e85a987f267250838398d4e27e44016ec5 (diff) |
til_fb: move isnan(ratio) test to before assert
Trivial fixup; this will always assert on the NaN case which is
expected when ratio=full.
Diffstat (limited to 'src')
-rw-r--r-- | src/til_fb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/til_fb.c b/src/til_fb.c index cc07909..0f7fe83 100644 --- a/src/til_fb.c +++ b/src/til_fb.c @@ -174,12 +174,12 @@ static _til_fb_page_t * _til_fb_page_apply_ratio(_til_fb_page_t *page) ratio = page->fb->ratio; fragment = &page->fragment.public; - assert(fragment->frame_width > 0 && fragment->frame_height > 0); - assert(ratio > 0.f); - if (isnan(ratio)) return page; + assert(fragment->frame_width > 0 && fragment->frame_height > 0); + assert(ratio > 0.f); + fragment_ratio = (float)fragment->frame_width / (float)fragment->frame_height; d = fragment_ratio - ratio; if (d < 0) { /* letterboxed, scale height */ |