From 8b504d9f82c4ba82a448d6e9e8d0f9b95e79b832 Mon Sep 17 00:00:00 2001 From: jdgordon Date: Mon, 21 Apr 2008 13:32:10 +0000 Subject: [PATCH] So, I was skimming the irc logs from my 3 day absense and I was pinged about a bug in the simplelist code and this function in particular. Neither time was the actual bug explained so I dont know what this commit fixes... I'm fairly certain it does fix it though because the old code was rediculously wrong. MY guess is it has something to do with the radio debug screen seen as its the only call to this with the param != 0. Please use the damn tracker for bug reports.. pinging someone when they arnt even online (as opposed to idling in the channel) really is a waste of time.) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17204 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/list.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/gui/list.c b/apps/gui/list.c index 2ba4d4e76..2c849660d 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c @@ -787,10 +787,11 @@ static char simplelist_text[SIMPLELIST_MAX_LINES][SIMPLELIST_MAX_LINELENGTH]; void simplelist_set_line_count(int lines) { if (lines < 0) - lines = 0; - else if (lines > SIMPLELIST_MAX_LINES) - lines = SIMPLELIST_MAX_LINES; - simplelist_line_count = 0; + simplelist_line_count = 0; + else if (lines >= SIMPLELIST_MAX_LINES) + simplelist_line_count = SIMPLELIST_MAX_LINES; + else + simplelist_line_count = lines; } /* get the current amount of lines shown */ int simplelist_get_line_count(void) -- 2.11.4.GIT