Code

command.c: put curly braces around a single large statement
[ncmpc.git] / src / screen_lyrics.c
index 0e21536b2f0c5ea2fa643d23a04ef556686f9d99..e655fc5f37c1fcb53e2ce79d62b9c4be3aa0bb67 100644 (file)
@@ -313,9 +313,12 @@ lyrics_title(char *str, size_t size)
                n = snprintf(str, size, "%s: %s - %s",
                             _("Lyrics"),
                             current.artist, current.title);
-               if (options.lyrics_show_plugin && current.plugin_name != NULL)
+
+               if (options.lyrics_show_plugin && current.plugin_name != NULL &&
+                   (unsigned int) n < size - 1)
                        snprintf(str + n, size - n, " (%s)",
                                 current.plugin_name);
+
                return str;
        } else
                return _("Lyrics");