Fixed next_user_handle to also work on deleted handles.
This commit is contained in:
parent
2da362f5b6
commit
65adc24f14
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue