diff --git a/util/js_textdecoder.cpp b/util/js_textdecoder.cpp index 55bafc1..a5dc293 100755 --- a/util/js_textdecoder.cpp +++ b/util/js_textdecoder.cpp @@ -62,7 +62,7 @@ namespace OHOS::Util { napi_value TextDecoder::Decode(napi_value src, bool iflag) { uint32_t flags = 0; - flags |= iflag ? 0 : static_cast(ConverterFlags::FLUSH_FLG); + flags |= (iflag ? 0 : static_cast(ConverterFlags::FLUSH_FLG)); UBool flush = ((flags & static_cast(ConverterFlags::FLUSH_FLG))) == static_cast(ConverterFlags::FLUSH_FLG); napi_typedarray_type type;