diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index 68ed1b983d8..a44ca364c56 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -82,14 +82,14 @@ static unsigned char byte_from_hex_char(WCHAR wHex) case '7': case '8': case '9': - return wHex - '0'; + return (wHex - '0') & 0xf; case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - return wHex - 'a' + 10; + return (wHex - 'a' + 10) & 0xf; default: return 0; }