summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-04-20 03:47:46 +0200
committerraveit65 <[email protected]>2019-04-21 11:01:24 +0200
commitef40478f1c2cee63cb14d53858ac11d392597550 (patch)
treea014b830fb0537eb6c4d2bdcf5f2f0bc97bf0814
parent741d0b692910ceab338b4b67e440c6ae426ab1f6 (diff)
downloadmate-calc-ef40478f1c2cee63cb14d53858ac11d392597550.tar.bz2
mate-calc-ef40478f1c2cee63cb14d53858ac11d392597550.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";