4 Mar
2024
4 Mar
'24
2:39 p.m.
Jinoh Kang (@iamahuman) commented about dlls/win32u/winstation.c:
+ BOOL valid = TRUE; + + TRACE( "tid %04x, type %u\n", tid, type ); + + memset( info, 0, sizeof(*info) ); + info->index = -1; + + while ((session = get_shared_session( !valid ))) + { + info->session_id = session->id; + if ((info->index = get_thread_session_object_index( tid, type, &info->id )) == -1) break; + if ((valid = info->index < session->object_capacity)) break; + shared_session_release( session ); + } + + if (info->index == -1) ...or alternatively, use `valid` here:
```suggestion:-0+0 if (valid && info->index == -1) ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3103#note_63375