commit a1021d0577c993b65da4a19438def0cc7368ef64
parent f947fc1eb5ba24ad77b5a60c946e247fa72733cf
Author: Bor Grošelj Simić <bgs@turminal.net>
Date: Tue, 28 Feb 2023 16:55:01 +0100
cast shift operand to correct type
Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/types.c b/src/types.c
@@ -520,7 +520,7 @@ min_value(const struct type *t)
if (t->size == sizeof(intmax_t)) {
return INTMAX_MIN;
}
- return -(1 << (t->size * 8 - 1));
+ return -((intmax_t)1 << (t->size * 8 - 1));
}
static uintmax_t