From afac8b0e7d68453c535ce99aa040529c3082120d Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Fri, 30 Jun 2023 18:42:21 +0930 Subject: [PATCH] Avoid undefined signed left shift Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1841190 --- src/cairo-fixed-private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cairo-fixed-private.h b/src/cairo-fixed-private.h index 2259f113b..97329c36f 100644 --- a/src/cairo-fixed-private.h +++ b/src/cairo-fixed-private.h @@ -66,7 +66,7 @@ static inline cairo_fixed_t _cairo_fixed_from_int (int i) { - return i << CAIRO_FIXED_FRAC_BITS; + return (cairo_fixed_unsigned_t)i << CAIRO_FIXED_FRAC_BITS; } /* This is the "magic number" approach to converting a double into fixed