X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/281448385a8d62a7efc64ca29e5803958e55eb69..357f4c818d25cd63efc90363cc48d79c76f2faf1:/src/common/variant.cpp?ds=sidebyside diff --git a/src/common/variant.cpp b/src/common/variant.cpp index 371630d322..207c3a4f30 100644 --- a/src/common/variant.cpp +++ b/src/common/variant.cpp @@ -2360,6 +2360,15 @@ bool wxVariant::Convert(wxUniChar* value) const *value = (char) (((wxVariantDataLong*)GetData())->GetValue()); else if (type == wxT("bool")) *value = (char) (((wxVariantDataBool*)GetData())->GetValue()); + else if (type == wxS("string")) + { + // Also accept strings of length 1 + const wxString& str = (((wxVariantDataString*)GetData())->GetValue()); + if ( str.length() == 1 ) + *value = str[0]; + else + return false; + } else return false;