OLE uses VARIANT_TRUE and not TRUE for its boolean values.

VARIANT_TRUE is -1, unlike TRUE which is just 1, and we must use the former
and not the latter with OLE VARIANT values.

Closes #12910.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-01-29 14:20:42 +00:00
parent ff4713940d
commit 85ecb1d5ca

View File

@@ -161,7 +161,7 @@ WXDLLEXPORT bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& ole
else if (type == wxT("bool"))
{
oleVariant.vt = VT_BOOL;
oleVariant.boolVal = variant.GetBool();
oleVariant.boolVal = variant.GetBool() ? VARIANT_TRUE : VARIANT_FALSE;
}
else if (type == wxT("string"))
{