avutil/common: add parenthesis around GET_16BIT in GET_UTF16

Signed-off-by: Marton Balint <cus@passwd.hu>
pull/343/head
Marton Balint 5 years ago
parent 5df1c1ad9a
commit 1466bb0bad
  1. 4
      libavutil/common.h

@ -408,11 +408,11 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
* typically a goto statement.
*/
#define GET_UTF16(val, GET_16BIT, ERROR)\
val = GET_16BIT;\
val = (GET_16BIT);\
{\
unsigned int hi = val - 0xD800;\
if (hi < 0x800) {\
val = GET_16BIT - 0xDC00;\
val = (GET_16BIT) - 0xDC00;\
if (val > 0x3FFU || hi > 0x3FFU)\
ERROR\
val += (hi<<10) + 0x10000;\

Loading…
Cancel
Save