vlc | branch: master | Stanislas PLessia <[email protected]> | Tue Jul 26 14:08:07 2016 +0200| [c6bd1232c4404ad8c9451f503cd4b6621f6bfd3d] | committer: Hugo Beauzée-Luyssen
vlc_html_color: Assume opaque color when alpha isn't specified Signed-off-by: Hugo Beauzée-Luyssen <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c6bd1232c4404ad8c9451f503cd4b6621f6bfd3d --- src/misc/text_style.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/misc/text_style.c b/src/misc/text_style.c index 76ab4a9..06398f3 100644 --- a/src/misc/text_style.c +++ b/src/misc/text_style.c @@ -240,6 +240,10 @@ unsigned int vlc_html_color( const char *psz_value, bool* ok ) if( *psz_value == '#' ) { color = strtol( psz_value + 1, &psz_end, 16 ); + if ( psz_end - ( psz_value + 1 ) <= 6 && *psz_end == 0 ) + { + color |= 0xFF000000; + } if ( ok != NULL && ( *psz_end == 0 || isspace( *psz_end ) ) ) *ok = true; } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
