mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 15:05:53 +00:00
ICU-2194 fix bug found while running demo
X-SVN-Rev: 11288
This commit is contained in:
parent
a204c3713f
commit
8cf2a2cee5
2 changed files with 10 additions and 6 deletions
|
@ -36,7 +36,7 @@ enum {
|
|||
|
||||
enum {
|
||||
_IDNA_MAPPING_DATA_SIZE = 1700,
|
||||
_IDNA_MAP_TO_NOTHING = 0xFFF
|
||||
_IDNA_MAP_TO_NOTHING = 0x7FF
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -537,7 +537,7 @@ uidna_IDNToASCII( const UChar* src, int32_t srcLength,
|
|||
|
||||
for(;;){
|
||||
|
||||
labelLen = getNextSeparator(labelStart, -1, prep, &delimiter,&done, status);
|
||||
labelLen = getNextSeparator(labelStart,remainingLen, prep, &delimiter,&done, status);
|
||||
|
||||
b1Len = uidna_toASCII(labelStart, labelLen, b1, b1Capacity,
|
||||
options, parseError, status);
|
||||
|
@ -571,7 +571,9 @@ uidna_IDNToASCII( const UChar* src, int32_t srcLength,
|
|||
}
|
||||
|
||||
labelStart = delimiter;
|
||||
|
||||
if(remainingLen >0 ){
|
||||
remainingLen = srcLength - (delimiter - src);
|
||||
}
|
||||
if(done == TRUE){
|
||||
break;
|
||||
}
|
||||
|
@ -624,7 +626,7 @@ uidna_IDNToUnicode( const UChar* src, int32_t srcLength,
|
|||
|
||||
for(;;){
|
||||
|
||||
labelLen = getNextSeparator(labelStart, -1, prep, &delimiter, &done, status);
|
||||
labelLen = getNextSeparator(labelStart, remainingLen, prep, &delimiter, &done, status);
|
||||
|
||||
|
||||
b1Len = uidna_toUnicode( labelStart,labelLen, b1, b1Capacity,
|
||||
|
@ -655,8 +657,10 @@ uidna_IDNToUnicode( const UChar* src, int32_t srcLength,
|
|||
reqLength++;
|
||||
}
|
||||
|
||||
labelStart = delimiter;
|
||||
|
||||
labelStart = delimiter;
|
||||
if(remainingLen >0 ){
|
||||
remainingLen = srcLength - (delimiter - src);
|
||||
}
|
||||
if(done==TRUE){
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue