1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-02-17 15:45:56 -05:00

Fix crasher, when used as input.

This commit is contained in:
QC 2014-04-28 21:18:13 +02:00
parent 832c2cb584
commit fc88182484

View file

@ -828,8 +828,8 @@ void menu_draw ( textbox *text,
} }
else else
{ {
// Do pageinating // Do paginating
int page = selected / max_lines; int page = (max_lines > 0)?(selected / max_lines):0;
offset = page * max_lines; offset = page * max_lines;
*last_offset = offset; *last_offset = offset;
} }