From f50deea84933330010f7ce8bf5d0a8139c452490 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Thu, 30 Nov 2023 12:37:43 -0800 Subject: 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. --- src/til_fb.c | 6 +++--- 1 file 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 */ -- cgit v1.2.1