]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
ply-console-viewer: Disallow zero lines
authorRay Strode <rstrode@redhat.com>
Thu, 28 Dec 2023 16:35:10 +0000 (11:35 -0500)
committerRay Strode <rstrode@redhat.com>
Thu, 28 Dec 2023 16:35:10 +0000 (11:35 -0500)
A logic error meant the console viewer can end up being zero lines.

This commit fixes that.

src/libply-splash-graphics/ply-console-viewer.c

index ec304ba68b902f1085b5131e0d130aed27aaf60c..9b7968feaf73d70fcb37822cbbbb6258681e8288 100644 (file)
@@ -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);