diff options
author | Jens Arnold <amiconn@rockbox.org> | 2009-04-11 23:07:02 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2009-04-11 23:07:02 +0000 |
commit | fbe39975cfcce5b297cd54ff2952dd6cecebe3eb (patch) | |
tree | c37f272cd9fb89fd5f39fd70c4ef57015dfe8441 /apps/gui/scrollbar.c | |
parent | 76328bbfda561dabe30312ed9d510cc7ed2ef063 (diff) | |
download | rockbox-fbe39975cfcce5b297cd54ff2952dd6cecebe3eb.tar.gz rockbox-fbe39975cfcce5b297cd54ff2952dd6cecebe3eb.zip |
Slightly more compact boundary check.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20691 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/scrollbar.c')
-rw-r--r-- | apps/gui/scrollbar.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/gui/scrollbar.c b/apps/gui/scrollbar.c index 8a0b885c4b..0f2a485b32 100644 --- a/apps/gui/scrollbar.c +++ b/apps/gui/scrollbar.c | |||
@@ -96,10 +96,8 @@ void gui_scrollbar_draw(struct screen * screen, int x, int y, | |||
96 | /* Boundary check to make sure that height is reasonable, otherwise nothing | 96 | /* Boundary check to make sure that height is reasonable, otherwise nothing |
97 | * to do | 97 | * to do |
98 | */ | 98 | */ |
99 | if(height<2 || width<2) | 99 | if ((inner_wd | inner_ht) < 0) |
100 | { | ||
101 | return; | 100 | return; |
102 | } | ||
103 | 101 | ||
104 | if (flags & HORIZONTAL) | 102 | if (flags & HORIZONTAL) |
105 | inner_len = inner_wd; | 103 | inner_len = inner_wd; |