Code

lyrics: missing "break"
authorMax Kellermann <max@duempel.org>
Mon, 15 Sep 2008 11:27:33 +0000 (13:27 +0200)
committerMax Kellermann <max@duempel.org>
Mon, 15 Sep 2008 11:27:33 +0000 (13:27 +0200)
If get_text_line() fails, we should break from the loop.

src/screen_lyrics.c

index eb7035a0bba2061b01fef93ef05334345ded718f..99487da3396c03672643dd9a8d405d1b10d391a7 100644 (file)
@@ -89,7 +89,8 @@ static int store_lyr_hd(void)
                return -1;
 
        for (i = 3; i <= lyr_text.text->len; i++) {
-               if(get_text_line(&lyr_text, i, line_buf, 1024) == -1);
+               if (get_text_line(&lyr_text, i, line_buf, 1024) == -1)
+                       break;
                fputs(line_buf, lyr_file);
        }