https://bugs.winehq.org/show_bug.cgi?id=37759
--- Comment #4 from Sebastian Lackner sebastian@fds-team.de --- The new code added in your patch mixes spaces and tabs, which should probably be fixed before the submission to wine-patches@winehq.org. If possible also look at the corresponding test suite. There are already existing tests for this functio, and your special case could be easily added.
See dlls/kernel32/tests/locale.c, function test_GetStringTypeW.
Something like:
BOOL res;
/* test with src = NULL and count = 0 */ SetLastError(0xdeadbeef); memset(types,0,sizeof(types)); res = GetStringTypeW(CP_CTYPE1, NULL, 0, types); ok(!res, "GetStringTypeW unexpectedly succeeded\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error, got %u\n", GetLastError());
/* test with src = NULL and count != 0 */ SetLastError(0xdeadbeef); memset(types,0,sizeof(types)); res = GetStringTypeW(CP_CTYPE1, NULL, 10, types); ok(!res, "GetStringTypeW unexpectedly succeeded\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error, got %u\n", GetLastError());
Thanks for your effort :)