Signed-off-by: Paul Gofman pgofman@codeweavers.com --- tools/wmc/mcl.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/tools/wmc/mcl.c b/tools/wmc/mcl.c index 829f955606f..579d4b87882 100644 --- a/tools/wmc/mcl.c +++ b/tools/wmc/mcl.c @@ -85,6 +85,7 @@ static const WCHAR ustr_language[] = { 'L', 'a', 'n', 'g', 'u', 'a', 'g', 'e', 0 static const WCHAR ustr_languagenames[] = { 'L', 'a', 'n', 'g', 'u', 'a', 'g', 'e', 'N', 'a', 'm', 'e', 's', 0}; static const WCHAR ustr_messageid[] = { 'M', 'e', 's', 's', 'a', 'g', 'e', 'I', 'd', 0 }; static const WCHAR ustr_messageidtypedef[] = { 'M', 'e', 's', 's', 'a', 'g', 'e', 'I', 'd', 'T', 'y', 'p', 'e', 'd', 'e', 'f', 0 }; +static const WCHAR ustr_null[] = { 'N', 'u', 'l', 'l', 0 }; static const WCHAR ustr_outputbase[] = { 'O', 'u', 't', 'p', 'u', 't', 'B', 'a', 's', 'e', 0 }; static const WCHAR ustr_severity[] = { 'S', 'e', 'v', 'e', 'r', 'i', 't', 'y', 0 }; static const WCHAR ustr_severitynames[] = { 'S', 'e', 'v', 'e', 'r', 'i', 't', 'y', 'N', 'a', 'm', 'e', 's', 0 }; @@ -551,6 +552,7 @@ int mcy_lex(void) add_token(tok_severity, ustr_success, 0x00, 0, NULL, 0); add_token(tok_facility, ustr_application, 0xFFF, 0, NULL, 0); add_token(tok_facility, ustr_system, 0x0FF, 0, NULL, 0); + add_token(tok_facility, ustr_null, 0x000, 0, NULL, 0); add_token(tok_language, ustr_english, 0x409, 437, ustr_msg00001, 0); }
Fixes a crash in Horizon Zero Dawn.
Signed-off-by: Paul Gofman pgofman@codeweavers.com --- dlls/kernel32/tests/format_msg.c | 20 ++++++++++++++++++++ dlls/kernel32/winerror.mc | 7 +++++++ 2 files changed, 27 insertions(+)
diff --git a/dlls/kernel32/tests/format_msg.c b/dlls/kernel32/tests/format_msg.c index 7fd9d55377a..a0b1e4eef03 100644 --- a/dlls/kernel32/tests/format_msg.c +++ b/dlls/kernel32/tests/format_msg.c @@ -1743,6 +1743,25 @@ static void test_message_from_64bit_number(void) } }
+static void test_message_system_errors(void) +{ + static const DWORD error_codes[] = + { + E_NOTIMPL, + }; + + char buffer[256]; + unsigned int i; + DWORD len; + + for (i = 0; i < ARRAY_SIZE(error_codes); ++i) + { + len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, error_codes[i], + LANG_USER_DEFAULT, buffer, ARRAY_SIZE(buffer), NULL); + ok(len, "Got zero len, code %#x.\n", error_codes[i]); + } +} + START_TEST(format_msg) { DWORD ret; @@ -1771,4 +1790,5 @@ START_TEST(format_msg) test_message_allocate_buffer_wide(); test_message_invalid_flags_wide(); test_message_from_64bit_number(); + test_message_system_errors(); } diff --git a/dlls/kernel32/winerror.mc b/dlls/kernel32/winerror.mc index 258b2d6a31d..3d01db9541f 100644 --- a/dlls/kernel32/winerror.mc +++ b/dlls/kernel32/winerror.mc @@ -3757,3 +3757,10 @@ SymbolicName=TRUST_E_NOSIGNATURE Language=ENU No Signature found in file. . +MessageId=0x4001 +Severity=CoError +Facility=Null +SymbolicName=E_NOTIMPL +Language=ENU +Not implemented. +.
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=77563
Your paranoid android.
=== debiant (32 bit report) ===
kernel32: loader.c:3946: Test failed: kernel32.dll:2: wrong OptionalHeader.DataDirectory[i].Size 1b834c / 1b7c98
=== debiant (32 bit Chinese:China report) ===
kernel32: loader.c:3946: Test failed: kernel32.dll:2: wrong OptionalHeader.DataDirectory[i].Size 1b834c / 1b7c98
=== debiant (32 bit WoW report) ===
kernel32: loader.c:3946: Test failed: kernel32.dll:2: wrong OptionalHeader.DataDirectory[i].Size 1b834c / 1b7c98
=== debiant (64 bit WoW report) ===
kernel32: loader.c:3946: Test failed: kernel32.dll:2: wrong OptionalHeader.DataDirectory[i].Size 1b834c / 1b7c98