Merge branch 'fix-signed-left-shift' into 'master'

Avoid undefined signed left shift

See merge request cairo/cairo!484
This commit is contained in:
Uli Schlachter 2023-07-01 07:49:34 +00:00
commit 0317aafd3f

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