From ef40478f1c2cee63cb14d53858ac11d392597550 Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Sat, 20 Apr 2019 03:47:46 +0200 Subject: 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 --- src/math-buttons.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; -- cgit v1.2.1