Commit 65adc24f authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed next_user_handle to also work on deleted handles.

parent 2da362f5
...@@ -146,8 +146,9 @@ void *next_user_handle( user_handle_t *handle, enum user_object type ) ...@@ -146,8 +146,9 @@ void *next_user_handle( user_handle_t *handle, enum user_object type )
if (!*handle) entry = handles; if (!*handle) entry = handles;
else else
{ {
if (!(entry = handle_to_entry( *handle ))) return NULL; int index = (*handle & 0xffff) - FIRST_USER_HANDLE;
entry++; /* start from the next one */ if (index < 0 || index >= nb_handles) return NULL;
entry = handles + index + 1; /* start from the next one */
} }
while (entry < handles + nb_handles) while (entry < handles + nb_handles)
{ {
......
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