fix undefined behaviour due to using shift variable twice in the same expression
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7b514b3b43
commit
325125ba4f
@ -212,8 +212,9 @@ NSCursor* wxGetStockCursor( short sIndex )
|
|||||||
//do the rest of those bits and alphas :)
|
//do the rest of those bits and alphas :)
|
||||||
for (int shift = 0; shift < 32; ++shift)
|
for (int shift = 0; shift < 32; ++shift)
|
||||||
{
|
{
|
||||||
data[i] |= ( !!( (pCursor->mask[i] & (1 << (shift >> 1) )) ) ) << shift;
|
const int bit = 1 << (shift >> 1);
|
||||||
data[i] |= ( !( (pCursor->bits[i] & (1 << (shift >> 1) )) ) ) << ++shift;
|
data[i] |= ( !!( (pCursor->mask[i] & bit) ) ) << shift;
|
||||||
|
data[i] |= ( !( (pCursor->bits[i] & bit) ) ) << ++shift;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user