diff options
Diffstat (limited to 'CPP/Windows/PropVariantUtils.cpp')
-rwxr-xr-x | CPP/Windows/PropVariantUtils.cpp | 5 |
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) { |