diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2008-04-21 13:32:10 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2008-04-21 13:32:10 +0000 |
| commit | fa64dbb525379ebb4d4ef44bb232844a9c3e41a9 (patch) | |
| tree | 4e00f960848b3450498a88ebf25c3b3310c03199 | |
| parent | 2920359cca8a93814075d1bacecdbe9b8253f301 (diff) | |
| download | rockbox-fa64dbb525379ebb4d4ef44bb232844a9c3e41a9.zip rockbox-fa64dbb525379ebb4d4ef44bb232844a9c3e41a9.tar.gz rockbox-fa64dbb525379ebb4d4ef44bb232844a9c3e41a9.tar.bz2 rockbox-fa64dbb525379ebb4d4ef44bb232844a9c3e41a9.tar.xz | |
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
| -rw-r--r-- | apps/gui/list.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c index 2ba4d4e..2c84966 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) |