Commit 6f959a91 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

oleaut32/tests: Simplify the check for an empty string (PVS-Studio).

parent 8fd7c73a
......@@ -295,16 +295,14 @@ static void init(void)
HRESULT res;
res = VarBstrFromBool(VARIANT_TRUE, LANG_USER_DEFAULT, VAR_LOCALBOOL, &bstr);
ok(res == S_OK && (lstrlenW(bstr) > 0),
"Expected localized string for 'True'\n");
ok(res == S_OK && bstr[0], "Expected localized string for 'True'\n");
/* lstrcpyW / lstrcatW do not work on win95 */
memcpy(sz12_true, sz12, sizeof(sz12));
if (bstr) memcpy(&sz12_true[2], bstr, SysStringByteLen(bstr) + sizeof(WCHAR));
SysFreeString(bstr);
res = VarBstrFromBool(VARIANT_FALSE, LANG_USER_DEFAULT, VAR_LOCALBOOL, &bstr);
ok(res == S_OK && (lstrlenW(bstr) > 0),
"Expected localized string for 'False'\n");
ok(res == S_OK && bstr[0], "Expected localized string for 'False'\n");
memcpy(sz12_false, sz12, sizeof(sz12));
if (bstr) memcpy(&sz12_false[2], bstr, SysStringByteLen(bstr) + sizeof(WCHAR));
SysFreeString(bstr);
......
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