mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-10-06 01:43:00 +02:00
CodeQL IncorrectNotOperatorUsage.ql rtrDcmppose.c rtrCLEAR() usages
Maybe it was a single bit and '!' operator inverted a single bit, but it appears to be a 4-bit mask today. TODO check rtrMARKED() this looks like it uses '&' operator is in use but from the context of a bitmask maybe this should be '|' operator.
This commit is contained in:
committed by
Tim Edwards
parent
ca9229b35a
commit
6a537c4659
+2
-1
@@ -53,6 +53,7 @@
|
||||
|
||||
/* rtrMARK(t,s) Tile * t; int s;
|
||||
* Mark the indicated horizontal tile edge as a valid channel boundary.
|
||||
* FIXME this looks suspect, maybe it should be '|' operator and not '&'.
|
||||
*/
|
||||
#define rtrMARK(t,s) \
|
||||
((t)->ti_client = INT2CD((((int) CD2INT((t)->ti_client))&(s))))
|
||||
@@ -61,7 +62,7 @@
|
||||
* Clear the indicated horizontal tile edge as a valid channel boundary.
|
||||
*/
|
||||
#define rtrCLEAR(t,s) \
|
||||
((t)->ti_client = INT2CD((((int) CD2INT((t)->ti_client))&(!s))))
|
||||
((t)->ti_client = INT2CD((((int) CD2INT((t)->ti_client))&(~s))))
|
||||
|
||||
/* Private Procedures */
|
||||
int rtrSrPaint();
|
||||
|
||||
Reference in New Issue
Block a user