Commit 5ae1c396 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Avoid divide by zero when listbox set to zero height.

parent 73968f0b
......@@ -348,7 +348,12 @@ static void LISTBOX_UpdateSize( WND *wnd, LB_DESCR *descr )
descr->height = rect.bottom - rect.top;
if (!(descr->style & LBS_NOINTEGRALHEIGHT) && !(descr->style & LBS_OWNERDRAWVARIABLE))
{
UINT remaining = descr->height % descr->item_height;
UINT remaining;
if(descr->item_height != 0)
remaining = descr->height % descr->item_height;
else
remaining = 0;
if ((descr->height > descr->item_height) && remaining)
{
if (!(wnd->flags & WIN_ISWIN32))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment