]> git.sesse.net Git - vlc/commitdiff
text_renderer: avoid 0xff << 24 with an int type
authorFelix Abecassis <felix.abecassis@gmail.com>
Tue, 6 May 2014 16:43:41 +0000 (18:43 +0200)
committerFelix Abecassis <felix.abecassis@gmail.com>
Tue, 20 May 2014 12:53:14 +0000 (14:53 +0200)
modules/text_renderer/text_renderer.c

index 36485818a6fc5bbd2bc12a3c9b317e79255f704c..4119c34c30541dace4644228a86bd7a5e6f40698 100644 (file)
@@ -398,7 +398,7 @@ int HandleFontAttributes( xml_reader_t *p_xml_reader,
     rv = PushFont( p_fonts,
                    psz_fontname,
                    i_font_size,
-                   (i_font_color & 0xffffff) | ((i_font_alpha & 0xff) << 24),
+                   (i_font_color & 0xffffff) | ((uint32_t)(i_font_alpha & 0xff) << 24),
                    i_karaoke_bg_color );
 
     free( psz_fontname );
@@ -572,7 +572,7 @@ int ProcessNodes( filter_t *p_filter,
                        p_default_style->psz_fontname,
                        i_font_size,
                        (i_font_color & 0xffffff) |
-                          ((i_font_alpha & 0xff) << 24),
+                       ((uint32_t)(i_font_alpha & 0xff) << 24),
                        0x00ffffff );
     }
     if( p_default_style->i_style_flags & STYLE_BOLD )