Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit f828e9f

Browse files
committed
libfoundation: Correct relative ! and & operator precedence.
`!` actually has higher precedence than `&`, so the following doesn't do what you expect: !int_value & kBitFlag
1 parent d8278f8 commit f828e9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libfoundation/src/foundation-list.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ bool MCListCopy(MCListRef self, MCListRef& r_list)
9999
__MCAssertIsList(self);
100100

101101
// If we are immutable, just bump the reference count
102-
if (!self -> flags & kMCListFlagIsMutable)
102+
if (!(self -> flags & kMCListFlagIsMutable))
103103
{
104104
r_list = MCValueRetain(self);
105105
return true;

0 commit comments

Comments
 (0)