[cairo-commit] 2 commits - src/cairo-fixed-private.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jul 1 07:49:36 UTC 2023


 src/cairo-fixed-private.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0317aafd3fd21c2a0967cbde0f0aa591e8dd1e24
Merge: 42555cb0a afac8b0e7
Author: Uli Schlachter <psychon at znc.in>
Date:   Sat Jul 1 07:49:34 2023 +0000

    Merge branch 'fix-signed-left-shift' into 'master'
    
    Avoid undefined signed left shift
    
    See merge request cairo/cairo!484

commit afac8b0e7d68453c535ce99aa040529c3082120d
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Fri Jun 30 18:42:21 2023 +0930

    Avoid undefined signed left shift
    
    Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1841190

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


More information about the cairo-commit mailing list