From: Ray Strode Date: Thu, 28 Dec 2023 16:35:10 +0000 (-0500) Subject: ply-console-viewer: Disallow zero lines X-Git-Tag: 24.004.60~16^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0f90388da5e9847b02560c5e12842057952a65e;p=thirdparty%2Fplymouth.git ply-console-viewer: Disallow zero lines A logic error meant the console viewer can end up being zero lines. This commit fixes that. --- diff --git a/src/libply-splash-graphics/ply-console-viewer.c b/src/libply-splash-graphics/ply-console-viewer.c index ec304ba6..9b7968fe 100644 --- a/src/libply-splash-graphics/ply-console-viewer.c +++ b/src/libply-splash-graphics/ply-console-viewer.c @@ -120,7 +120,7 @@ ply_console_viewer_new (ply_pixel_display_t *display, line_count = ply_pixel_display_get_height (display) / console_viewer->font_height; /* Display at least one line */ - if (line_count < 0) + if (line_count == 0) line_count = 1; ply_label_free (measure_label);