https://bugs.winehq.org/show_bug.cgi?id=48471
--- Comment #3 from Vladimir Panteleev wine@thecybershadow.net --- My latest patch was rejected because I left an old test inconsistent with the rest of the file:
https://source.winehq.org/patches/data/176822
Upon attempting to fix this, I discovered that the reason the test was that way was because Wine's GetEnvironmentVariableA hid another inconsistency, in that it resets GetLastError to NO_ERROR when it doesn't fail, instead of preserving the error (like Windows and GetEnvironmentVariableW). I guess I will include a fix for that in the next patch series version.