We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e9080e commit 9358432Copy full SHA for 9358432
Release/src/utilities/asyncrt_utils.cpp
@@ -286,14 +286,13 @@ utf16string __cdecl conversions::utf8_to_utf16(const std::string &s)
286
}
287
else
288
{
289
- if ((*src & BIT8) != 0 && (*src & BIT7) == 0)
+ unsigned char numContBytes = 0;
290
+ uint32_t codePoint;
291
+ if ((*src & BIT7) == 0)
292
293
throw std::range_error("UTF-8 string character can never start with 10xxxxxx");
294
-
- unsigned char numContBytes = 0;
295
- uint32_t codePoint;
296
- if ((*src & BIT6) == 0) // 2 byte character, 0x80 to 0x7FF
+ else if ((*src & BIT6) == 0) // 2 byte character, 0x80 to 0x7FF
297
298
codePoint = *src & LOW_5BITS;
299
numContBytes = 1;
0 commit comments