Jinoh Kang (@iamahuman) commented about server/mapping.c:
+ index = session.object_count++; + else + { + for (index = 0; index < session.object_count; index++) + if (!session.shared->objects[index].obj.id) + break; + if (index == session.object_count) + { + if (grow_session_mapping()) return -1; + index = session.object_count++; + } + } + + SHARED_WRITE_BEGIN( &session.shared->objects[index], session_obj_t ) + { + shared->obj.id = ++session.next_object_id; Confusing variable name.
```suggestion:-0+0 shared->obj.id = ++session.last_object_id; ``` ```suggestion:-0+0 shared->obj.id = session.next_object_id++; ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3103#note_63265