https://bugs.winehq.org/show_bug.cgi?id=47762
Bug ID: 47762 Summary: LoadStringA fails instead of returning const pointer to string if buffer length is zero Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: tsmx@tut.by Distribution: ---
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadst...
According to MSDN doc, LoadStringA should be able to return const pointer without using allocated buffer if the buffer size is set to zero.
Here we see that Wine just returns -1 in that case:
https://source.winehq.org/git/wine.git/blob/refs/heads/master:/dlls/user32/r...
Since there is something that looks legit in the LoadStringW just above, it shouldn't be too hard to fix, amirite?