Commit 6f35351f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

kernel32: EnumTimeFormatsA() doesn't support TIME_NOSECONDS.

parent 982c3ede
......@@ -1930,6 +1930,12 @@ BOOL WINAPI EnumTimeFormatsA(TIMEFMT_ENUMPROCA proc, LCID lcid, DWORD flags)
{
char buf[256];
if (flags & ~LOCALE_USE_CP_ACP)
{
SetLastError(ERROR_INVALID_FLAGS);
return FALSE;
}
if (!proc)
{
SetLastError(ERROR_INVALID_PARAMETER);
......
......@@ -3520,14 +3520,13 @@ static void test_EnumTimeFormatsW(void)
/* EnumTimeFormatsA doesn't support this flag */
ret = EnumTimeFormatsA(enum_datetime_procA, lcid, TIME_NOSECONDS);
todo_wine {
ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, "EnumTimeFormatsA(TIME_NOSECONDS) ret %d, error %d\n", ret,
GetLastError());
ret = EnumTimeFormatsA(NULL, lcid, TIME_NOSECONDS);
ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, "EnumTimeFormatsA(TIME_NOSECONDS) ret %d, error %d\n", ret,
GetLastError());
}
/* And it's not supported by GetLocaleInfoA either */
ret = GetLocaleInfoA(lcid, LOCALE_SSHORTTIME, buf, sizeof(buf)/sizeof(buf[0]));
ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, "GetLocaleInfoA(LOCALE_SSHORTTIME) ret %d, error %d\n", ret,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment