Commit 1466bb0b authored by Marton Balint's avatar Marton Balint

avutil/common: add parenthesis around GET_16BIT in GET_UTF16

Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 5df1c1ad
...@@ -408,11 +408,11 @@ static av_always_inline av_const int av_parity_c(uint32_t v) ...@@ -408,11 +408,11 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* typically a goto statement. * typically a goto statement.
*/ */
#define GET_UTF16(val, GET_16BIT, ERROR)\ #define GET_UTF16(val, GET_16BIT, ERROR)\
val = GET_16BIT;\ val = (GET_16BIT);\
{\ {\
unsigned int hi = val - 0xD800;\ unsigned int hi = val - 0xD800;\
if (hi < 0x800) {\ if (hi < 0x800) {\
val = GET_16BIT - 0xDC00;\ val = (GET_16BIT) - 0xDC00;\
if (val > 0x3FFU || hi > 0x3FFU)\ if (val > 0x3FFU || hi > 0x3FFU)\
ERROR\ ERROR\
val += (hi<<10) + 0x10000;\ val += (hi<<10) + 0x10000;\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment