(GLUI) Turn y into an int in glui_render_menu_list

In large screens y can be negative
This commit is contained in:
Higor Eurípedes 2015-06-06 09:30:01 -03:00
parent 2da7ef978f
commit 615e03cfc9

View File

@ -297,10 +297,9 @@ static void glui_render_menu_list(glui_handle_t *glui,
char message[PATH_MAX_LENGTH],
entry_title_buf[PATH_MAX_LENGTH], type_str_buf[PATH_MAX_LENGTH];
bool entry_selected;
unsigned y = menu->header_height - menu->scroll_y + (glui->line_height * i);
int max_visible_entries = ((y + glui->line_height));
int y = menu->header_height - menu->scroll_y + (glui->line_height * i);
if (y > height || (max_visible_entries < 0))
if (y > height || ((y + (int)glui->line_height) < 0))
continue;
entry_selected = menu_entry_is_currently_selected(i);