Stop a listbox bug that causes a div by zero when the item height

is zero. Doesn't solve the root of the problem though.
This commit is contained in:
Paul Quinn 1999-05-22 18:45:06 +00:00 committed by Alexandre Julliard
parent 594d5dd78c
commit 7572207564
1 changed files with 2 additions and 1 deletions

View File

@ -297,7 +297,8 @@ static void LISTBOX_UpdatePage( WND *wnd, LB_DESCR *descr )
{
INT page_size;
if ((page_size = descr->height / descr->item_height) < 1) page_size = 1;
if ((descr->item_height == 0) || (page_size = descr->height / descr->item_height) < 1)
page_size = 1;
if (page_size == descr->page_size) return;
descr->page_size = page_size;
if (descr->style & LBS_MULTICOLUMN)