diff options
-rw-r--r-- | libass/ass_utils.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libass/ass_utils.c b/libass/ass_utils.c index 3dab74c..3c2c40a 100644 --- a/libass/ass_utils.c +++ b/libass/ass_utils.c @@ -81,7 +81,8 @@ int strtocolor(ASS_Library *library, char **q, uint32_t *res, int hex) int base = hex ? 16 : 10; if (*p == '&') - ++p; + while (*p == '&') + ++p; else ass_msg(library, MSGL_DBG2, "suspicious color format: \"%s\"\n", p); @@ -92,6 +93,9 @@ int strtocolor(ASS_Library *library, char **q, uint32_t *res, int hex) result = mystrtou32(&p, base, &color); } + while (*p == '&' || *p == 'H') + ++p; + { unsigned char *tmp = (unsigned char *) (&color); unsigned char b; |