aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormvdan@mvdan.cc <mvdan@mvdan.cc>2015-04-22 15:08:00 +0200
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2015-04-27 10:09:49 +0200
commit4f21c41a1c19f769a2bf7941ee18fa0606266cca (patch)
treec7bde8669683a407a10f8190f962907215e6003d
parent3a5053f6c19195df5fde84a7e5eb3217443bb9ab (diff)
downloadst-4f21c41a1c19f769a2bf7941ee18fa0606266cca.tar.gz
st-4f21c41a1c19f769a2bf7941ee18fa0606266cca.tar.bz2
Clarify calculation precedence for '&' and '?'
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
-rw-r--r--st.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/st.c b/st.c
index 6f8d83f..6c167b5 100644
--- a/st.c
+++ b/st.c
@@ -855,9 +855,9 @@ mousereport(XEvent *e) {
}
if(!IS_SET(MODE_MOUSEX10)) {
- button += (state & ShiftMask ? 4 : 0)
- + (state & Mod4Mask ? 8 : 0)
- + (state & ControlMask ? 16 : 0);
+ button += ((state & ShiftMask ) ? 4 : 0)
+ + ((state & Mod4Mask ) ? 8 : 0)
+ + ((state & ControlMask) ? 16 : 0);
}
len = 0;