From 208d3d7cda2a92001f990c14d86f1240c3d7302b Mon Sep 17 00:00:00 2001 From: goerch Date: Mon, 18 Sep 2023 23:01:32 +0200 Subject: [PATCH] Fix compiler warning --- unicode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unicode.h b/unicode.h index 99bf8137c..cc6b33df1 100644 --- a/unicode.h +++ b/unicode.h @@ -332,7 +332,7 @@ static uint32_t codepoint_from_utf16(const std::vector& utf16, size_t& else { if (offset + 1 >= utf16.size() || !((utf16[1] & 0xdc00) == 0xdc00)) throw std::invalid_argument("invalid character"); - auto result = 0x10000 + ((utf16[0] & 0x03ff) << 10) | (utf16[1] & 0x03ff); + auto result = 0x10000 + (((utf16[0] & 0x03ff) << 10) | (utf16[1] & 0x03ff)); offset += 2; return result; }