24 Oct
2022
24 Oct
'22
8:54 a.m.
Huw Davies (@huw) commented about dlls/win32u/font.c:
static void set_multi_value_key( HKEY hkey, const WCHAR *name, const char *value, DWORD len ) { - WCHAR valueW[256]; + WCHAR valueW[512]; + assert(len <= sizeof(valueW)/sizeof(WCHAR));
Since this isn't in a hot path, let's dynamically allocate `valueW`. Also note for future reference `ARRAY_SIZE(array)` instead of `sizeof(array) / sizeof(array[0])`. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1147#note_11859