Fixed next_user_handle to also work on deleted handles.

This commit is contained in:
Alexandre Julliard 2002-05-31 18:25:53 +00:00
parent 2da362f5b6
commit 65adc24f14
1 changed files with 3 additions and 2 deletions

View File

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