20 Jul
2023
20 Jul
'23
7:59 a.m.
Hans Leidekker (@hans) commented about programs/klist/main.c:
+#include "wine/debug.h" + +#include "resources.h" + +WINE_DEFAULT_DEBUG_CHANNEL(klist); + +static const WCHAR *resource_fallback = L"RESOURCELOADFAILED"; + +static const WCHAR *load_resource(UINT id) +{ + WCHAR *res = NULL; + + if (!LoadStringW(GetModuleHandleW(NULL), id, (LPWSTR)&res, 0)) + { + WINE_ERR("LoadString failed with %ld\n", GetLastError()); + return resource_fallback; No need for a fallback, you can assume that LoadStringW() doesn't fail like most programs do.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3347#note_39576