Signed-off-by: João Diogo Craveiro Ferreira devilj@outlook.pt --- dlls/kernel32/locale.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index 752136be07..fd0c283790 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -4611,21 +4611,24 @@ int WINAPI GetGeoInfoEx(PWSTR location, GEOTYPE geotype, PWSTR geoData, int geoD /****************************************************************************** * EnumSystemGeoID (KERNEL32.@) * - * Call a users function for every location available on the system. + * Call a user's function for every location available on the system. * * PARAMS - * geoclass [I] Type of information desired (SYSGEOTYPE enum from "winnls.h") + * geoclass [I] Type of location desired (SYSGEOTYPE enum from "winnls.h") * parent [I] GEOID for the parent * enumproc [I] Callback function to call for each location * * RETURNS * Success: TRUE. * Failure: FALSE. Use GetLastError() to determine the cause. + * + * NOTES + * On failure, GetLastError() will return one of the following values: + * - ERROR_INVALID_PARAMETER: enumproc was NULL; + * - ERROR_INVALID_FLAGS: The geoclass argument was invalid. */ BOOL WINAPI EnumSystemGeoID(GEOCLASS geoclass, GEOID parent, GEO_ENUMPROC enumproc) { - INT i; - TRACE("(%d, %d, %p)\n", geoclass, parent, enumproc);
if (!enumproc) { @@ -4633,15 +4636,15 @@ BOOL WINAPI EnumSystemGeoID(GEOCLASS geoclass, GEOID parent, GEO_ENUMPROC enumpr return FALSE; }
- if (geoclass != GEOCLASS_NATION && geoclass != GEOCLASS_REGION) { + if (geoclass != GEOCLASS_NATION && geoclass != GEOCLASS_REGION && geoclass != GEOCLASS_ALL) { SetLastError(ERROR_INVALID_FLAGS); return FALSE; }
- for (i = 0; i < ARRAY_SIZE(geoinfodata); i++) { + for (int i = 0; i < ARRAY_SIZE(geoinfodata); i++) { const struct geoinfo_t *ptr = &geoinfodata[i];
- if (geoclass == GEOCLASS_NATION && (ptr->kind == LOCATION_REGION)) + if (geoclass == GEOCLASS_NATION && (ptr->kind != LOCATION_NATION)) continue;
if (geoclass == GEOCLASS_REGION && (ptr->kind == LOCATION_NATION))
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=58235
Your paranoid android.
=== debian10 (32 bit report) ===
kernel32: debugger.c:320: Test failed: GetThreadContext failed: 5
=== debian10 (32 bit Chinese:China report) ===
kernel32: debugger.c:320: Test failed: GetThreadContext failed: 5
=== debian10 (64 bit WoW report) ===
kernel32: debugger.c:320: Test failed: GetThreadContext failed: 5 debugger.c:320: Test failed: GetThreadContext failed: 5