X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/38fbf2fd31f5cd99b500914d6037b1d06b608645..0f5d89e82340278ed3d7d50029f37cab2c41a57e:/icuSources/common/uts46.cpp diff --git a/icuSources/common/uts46.cpp b/icuSources/common/uts46.cpp index f2cff2d5..5a23572e 100644 --- a/icuSources/common/uts46.cpp +++ b/icuSources/common/uts46.cpp @@ -1015,8 +1015,8 @@ UTS46::checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) c ) { info.isOkBiDi=FALSE; } - // Get the directionalities of the intervening characters. - uint32_t mask=0; + // Add the directionalities of the intervening characters. + uint32_t mask=firstMask|lastMask; while(i(uprv_strlen(label)) : length); CheckedArrayByteSink sink(dest, capacity); IDNAInfo info; reinterpret_cast(idna)->labelToASCII_UTF8(src, sink, info, *pErrorCode); @@ -1431,7 +1430,7 @@ uidna_labelToUnicodeUTF8(const UIDNA *idna, if(!checkArgs(label, length, dest, capacity, pInfo, pErrorCode)) { return 0; } - StringPiece src(label, length<0 ? uprv_strlen(label) : length); + StringPiece src(label, length<0 ? static_cast(uprv_strlen(label)) : length); CheckedArrayByteSink sink(dest, capacity); IDNAInfo info; reinterpret_cast(idna)->labelToUnicodeUTF8(src, sink, info, *pErrorCode); @@ -1447,7 +1446,7 @@ uidna_nameToASCII_UTF8(const UIDNA *idna, if(!checkArgs(name, length, dest, capacity, pInfo, pErrorCode)) { return 0; } - StringPiece src(name, length<0 ? uprv_strlen(name) : length); + StringPiece src(name, length<0 ? static_cast(uprv_strlen(name)) : length); CheckedArrayByteSink sink(dest, capacity); IDNAInfo info; reinterpret_cast(idna)->nameToASCII_UTF8(src, sink, info, *pErrorCode); @@ -1463,7 +1462,7 @@ uidna_nameToUnicodeUTF8(const UIDNA *idna, if(!checkArgs(name, length, dest, capacity, pInfo, pErrorCode)) { return 0; } - StringPiece src(name, length<0 ? uprv_strlen(name) : length); + StringPiece src(name, length<0 ? static_cast(uprv_strlen(name)) : length); CheckedArrayByteSink sink(dest, capacity); IDNAInfo info; reinterpret_cast(idna)->nameToUnicodeUTF8(src, sink, info, *pErrorCode);