Re: [PATCH v9 0/6] MR9147: rometadata: Implement CIL assembly/metadata reader + some IMetaDataTables methods.
13 Oct
2025
13 Oct
'25
9:20 a.m.
Hans Leidekker (@hans) commented about dlls/rometadata/assembly.c:
+{ + const BYTE *ptr; + ULONG size_len; + HRESULT hr; + + if (idx >= assembly->stream_blobs.size) return E_INVALIDARG; + ptr = assembly->stream_blobs.start + idx; + if (FAILED(hr = decode_int(ptr, size, &size_len))) return hr; + *blob = ptr + size_len; + return S_OK; +} + +const GUID *assembly_get_guid(const assembly_t *assembly, ULONG idx) +{ + idx = (idx - 1) * sizeof(GUID); /* Indices into the GUID heap are 1-based */ + return idx < assembly->stream_guids.size ? (const GUID *)(assembly->stream_guids.start + idx) : NULL; Using an offset variable would be cleaner.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9147#note_118350
67
Age (days ago)
67
Last active (days ago)
0 comments
1 participants
participants (1)
-
Hans Leidekker (@hans)