Commit f91c8578 authored by Dan Kegel's avatar Dan Kegel Committed by Alexandre Julliard

mlang/tests: Don't call lstrcpyW on a null string.

parent acaa0dc2
......@@ -1203,21 +1203,25 @@ static void test_GetRfc1766Info(IMultiLanguage2 *iML2)
"#%02d: got '%s' (expected '%s')\n", i, rfc1766A, info_table[i].rfc1766);
/* Some IE versions truncate an oversized name one character to short */
lstrcpyW(short_broken_name, info_table[i].broken_name);
short_broken_name[MAX_LOCALE_NAME - 2] = '\0';
if (info_table[i].broken_name) {
lstrcpyW(short_broken_name, info_table[i].broken_name);
short_broken_name[MAX_LOCALE_NAME - 2] = 0;
}
if (info_table[i].todo & TODO_NAME) {
todo_wine
ok( (!lstrcmpW(prfc->wszLocaleName, info_table[i].localename)) ||
(info_table[i].broken_name && (
broken(!lstrcmpW(prfc->wszLocaleName, info_table[i].broken_name)) || /* IE < 6.0 */
broken(!lstrcmpW(prfc->wszLocaleName, short_broken_name)),
broken(!lstrcmpW(prfc->wszLocaleName, short_broken_name)))),
"#%02d: got %s (expected %s)\n", i,
wine_dbgstr_w(prfc->wszLocaleName), wine_dbgstr_w(info_table[i].localename));
}
else
ok( (!lstrcmpW(prfc->wszLocaleName, info_table[i].localename)) ||
(info_table[i].broken_name && (
broken(!lstrcmpW(prfc->wszLocaleName, info_table[i].broken_name)) || /* IE < 6.0 */
broken(!lstrcmpW(prfc->wszLocaleName, short_broken_name)),
broken(!lstrcmpW(prfc->wszLocaleName, short_broken_name)))),
"#%02d: got %s (expected %s)\n", i,
wine_dbgstr_w(prfc->wszLocaleName), wine_dbgstr_w(info_table[i].localename));
......
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