Zhiyi Zhang (@zhiyi) commented about dlls/win32u/sysparams.c:
{ d = w & 0x1f; if (!d || d - 1 > 'Z' - 'A') return FALSE; - monitor_id_string[2 - i] = 'A' + d - 1; + if (monitor_id_string) monitor_id_string[2 - i] = 'A' + d - 1; w >>= 5; } if (w) return FALSE; w = edid[10] | (edid[11] << 8); /* Product code, little endian. */ + if (man_id) + { + *man_id = *(unsigned short *)(edid + 8); + *prod_code = w; + return TRUE;
This is assuming monitor_id_string is not needed when man_id is not NULL. I think it would be clearer if you introduce separate helpers for getting Monitor ID, Manufacturer ID, and Product ID. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2177#note_24497