Avoid undefined signed left shift

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1841190
This commit is contained in:
Adrian Johnson 2023-06-30 18:42:21 +09:30
parent 42555cb0a7
commit afac8b0e7d

View file

@ -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