diff options
Diffstat (limited to 'CPP/7zip/Archive/Common/ParseProperties.cpp')
-rwxr-xr-x | CPP/7zip/Archive/Common/ParseProperties.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/CPP/7zip/Archive/Common/ParseProperties.cpp b/CPP/7zip/Archive/Common/ParseProperties.cpp index f0d4e29c..83d51241 100755 --- a/CPP/7zip/Archive/Common/ParseProperties.cpp +++ b/CPP/7zip/Archive/Common/ParseProperties.cpp @@ -99,12 +99,12 @@ HRESULT ParsePropDictionaryValue(const UString &name, const PROPVARIANT &prop, U bool StringToBool(const UString &s, bool &res) { - if (s.IsEmpty() || s.CompareNoCase(L"ON") == 0) + if (s.IsEmpty() || s.CompareNoCase(L"ON") == 0 || s.Compare(L"+") == 0) { res = true; return true; } - if (s.CompareNoCase(L"OFF") == 0) + if (s.CompareNoCase(L"OFF") == 0 || s.Compare(L"-") == 0) { res = false; return true; @@ -119,6 +119,9 @@ HRESULT SetBoolProperty(bool &dest, const PROPVARIANT &value) case VT_EMPTY: dest = true; return S_OK; + case VT_BOOL: + dest = (value.boolVal != VARIANT_FALSE); + return S_OK; /* case VT_UI4: dest = (value.ulVal != 0); |