Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/Windows/PropVariantUtils.cpp')
-rwxr-xr-xCPP/Windows/PropVariantUtils.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/CPP/Windows/PropVariantUtils.cpp b/CPP/Windows/PropVariantUtils.cpp
index 0c9e8f34..0a9cfab7 100755
--- a/CPP/Windows/PropVariantUtils.cpp
+++ b/CPP/Windows/PropVariantUtils.cpp
@@ -53,13 +53,14 @@ AString FlagsToString(const CUInt32PCharPair *pairs, unsigned num, UInt32 flags)
for (unsigned i = 0; i < num; i++)
{
const CUInt32PCharPair &p = pairs[i];
- if ((flags & p.Value) != 0)
+ UInt32 flag = (UInt32)1 << (unsigned)p.Value;
+ if ((flags & flag) != 0)
{
if (!s.IsEmpty())
s += ' ';
s += p.Name;
}
- flags &= ~p.Value;
+ flags &= ~flag;
}
if (flags != 0)
{