Commit 4f7d893c authored by Uwe Bonnes's avatar Uwe Bonnes Committed by Alexandre Julliard

get_window_children: only decrement available size if element was

written.
parent 07a308d6
......@@ -553,11 +553,12 @@ DECL_HANDLER(get_window_children)
len = min( get_reply_max_size(), total * sizeof(user_handle_t) );
if (len && ((data = set_reply_data_size( len ))))
{
for (ptr = parent->first_child; ptr && len; ptr = ptr->next, len -= sizeof(*data))
for (ptr = parent->first_child; ptr && len; ptr = ptr->next)
{
if (req->atom && ptr->atom != req->atom) continue;
if (req->tid && get_thread_id(ptr->thread) != req->tid) continue;
*data++ = ptr->handle;
len -= sizeof(*data);
}
}
}
......
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