Skip to content

Commit f0d45a4

Browse files
committedMar 9, 2023
Fix overflow exception when serializing
1 parent 9c65488 commit f0d45a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎Release/src/utilities/asyncrt_utils.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ inline size_t count_utf16_to_utf8(const utf16string& w)
502502
throw std::range_error("UTF-16 string is missing low surrogate");
503503
}
504504

505-
const auto lowSurrogate = srcData[index];
505+
const auto lowSurrogate = static_cast<int>(srcData[index]);
506506
if (lowSurrogate < L_SURROGATE_START || lowSurrogate > L_SURROGATE_END)
507507
{
508508
throw std::range_error("UTF-16 string has invalid low surrogate");

0 commit comments

Comments
 (0)