diff options
Diffstat (limited to 'deps/icu-small/source/common/ucnv2022.cpp')
-rw-r--r-- | deps/icu-small/source/common/ucnv2022.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/deps/icu-small/source/common/ucnv2022.cpp b/deps/icu-small/source/common/ucnv2022.cpp index 854ca60cc31..4a35ff85e10 100644 --- a/deps/icu-small/source/common/ucnv2022.cpp +++ b/deps/icu-small/source/common/ucnv2022.cpp @@ -2772,7 +2772,7 @@ getTrailByte: /* report a pair of illegal bytes if the second byte is not a DBCS starter */ ++mySource; /* add another bit so that the code below writes 2 bytes in case of error */ - mySourceChar = 0x10000 | (mySourceChar << 8) | trailByte; + mySourceChar = static_cast<UChar>(0x10000 | (mySourceChar << 8) | trailByte); } } else { args->converter->toUBytes[0] = (uint8_t)mySourceChar; @@ -3304,7 +3304,7 @@ UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, myData->isEmptySegment = FALSE; /* we are handling it, reset to avoid future spurious errors */ *err = U_ILLEGAL_ESCAPE_SEQUENCE; args->converter->toUCallbackReason = UCNV_IRREGULAR; - args->converter->toUBytes[0] = mySourceChar; + args->converter->toUBytes[0] = static_cast<uint8_t>(mySourceChar); args->converter->toULength = 1; args->target = myTarget; args->source = mySource; |