summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-04-20 03:47:46 +0200
committermonsta <[email protected]>2020-01-16 15:39:13 +0300
commit340b16e8d22f6e8af99d94525f19a55b1b5f9454 (patch)
tree6766c3534fac2e72f0e75dd6e659cd34f1b4fd3f
parentfc9b4939fdaf8ffff471e675887ee849bea5a0d7 (diff)
downloadmate-calc-340b16e8d22f6e8af99d94525f19a55b1b5f9454.tar.bz2
mate-calc-340b16e8d22f6e8af99d94525f19a55b1b5f9454.tar.xz
math-buttons: avoid shifting signed 64-bit value by 63 bits
Fixes cppcheck warning: [src/math-buttons.c:391]: (error) Shifting signed 64-bit value by 63 bits is undefined behaviour
-rw-r--r--src/math-buttons.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/math-buttons.c b/src/math-buttons.c
index 8334706..1d96b3e 100644
--- a/src/math-buttons.c
+++ b/src/math-buttons.c
@@ -388,7 +388,7 @@ update_bit_panel(MathButtons *buttons)
for (i = 0; i < MAXBITS; i++) {
const gchar *label;
- if (bits & (1LL << (MAXBITS-i-1)))
+ if (bits & (1LLU << (MAXBITS-i-1)))
label = " 1";
else
label = " 0";