diff options
Diffstat (limited to 'apps/gui/scrollbar.c')
-rw-r--r-- | apps/gui/scrollbar.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/gui/scrollbar.c b/apps/gui/scrollbar.c index f7dead566e..6f7928f49b 100644 --- a/apps/gui/scrollbar.c +++ b/apps/gui/scrollbar.c | |||
@@ -190,10 +190,10 @@ void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap bm, int x, | |||
190 | if(max > items) | 190 | if(max > items) |
191 | max = items; | 191 | max = items; |
192 | 192 | ||
193 | if (flags & VERTICAL) | 193 | if (flags & HORIZONTAL) |
194 | inner_len = height; | ||
195 | else | ||
196 | inner_len = width; | 194 | inner_len = width; |
195 | else | ||
196 | inner_len = height; | ||
197 | 197 | ||
198 | /* avoid overflows */ | 198 | /* avoid overflows */ |
199 | while (items > (INT_MAX / inner_len)) { | 199 | while (items > (INT_MAX / inner_len)) { |