March 27, 2026
12:50 p.m.
eric pouech (@epo) commented about dlls/kernel32/tests/loader.c:
DeleteFileA( long_path ); }
+static void test_getmodulefilenamew_string_termination(void) +{ + WCHAR dll_name[MAX_PATH]; + size_t dll_name_len, dll_name_term; + DWORD rv, err; + + GetModuleFileNameW(NULL, dll_name, MAX_PATH);
sorry for not advising for this earlier on, but we usually insert `SetLastError(0xdeadbeef); `before calling the APIs it turns out that some APIs don't set last error in case of success; so this ensures that we check against the value set in the API call (shall be done before all the calls to GetModuleFileNameW) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10291#note_134031