From 5e839e5d740f0056b38f8f338e46ac771306fd5b Mon Sep 17 00:00:00 2001 From: ToadKing Date: Sun, 5 May 2013 16:19:27 -0400 Subject: [PATCH] fix compile warnings --- frontend/menu/menu_common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/menu/menu_common.c b/frontend/menu/menu_common.c index 35f5e58bf9..6fa61f49df 100644 --- a/frontend/menu/menu_common.c +++ b/frontend/menu/menu_common.c @@ -571,7 +571,10 @@ void menu_ticker_line(char *buf, size_t len, unsigned index, const char *str, bo } if (!selected) - snprintf(buf, len, "%.*s...", len - 3, str); + { + strlcpy(buf, str, len + 1 - 3); + strlcat(buf, "...", len + 1); + } else { // Wrap long strings in options with some kind of ticker line.