diff --git a/include/transport/utf8/unchecked.h b/include/transport/utf8/unchecked.h index 3aa1a5dbd8d52a657236804c1685bfc8fadeecc9..540ec5e6d07d9d091d998ce6ccf392a45ebc06c2 100644 --- a/include/transport/utf8/unchecked.h +++ b/include/transport/utf8/unchecked.h @@ -45,13 +45,13 @@ namespace utf8 } else if (cp < 0x10000) { // three octets *(result++) = static_cast((cp >> 12) | 0xe0); - *(result++) = static_cast((cp >> 6) & 0x3f | 0x80); + *(result++) = static_cast(((cp >> 6) & 0x3f) | 0x80); *(result++) = static_cast((cp & 0x3f) | 0x80); } else { // four octets *(result++) = static_cast((cp >> 18) | 0xf0); - *(result++) = static_cast((cp >> 12)& 0x3f | 0x80); - *(result++) = static_cast((cp >> 6) & 0x3f | 0x80); + *(result++) = static_cast(((cp >> 12) & 0x3f)| 0x80); + *(result++) = static_cast(((cp >> 6) & 0x3f) | 0x80); *(result++) = static_cast((cp & 0x3f) | 0x80); } return result;