ICU-4235 Fix problem detected by RandomCollatorTest - prevent element list count from becoming less than zero

X-SVN-Rev: 18399
This commit is contained in:
Vladimir Weinstein 2005-08-04 22:36:44 +00:00
parent efad0e1488
commit 9ab7bcfae6

View File

@ -1583,7 +1583,7 @@ uint32_t ucol_tok_assembleTokenList(UColTokenParser *src, UParseError *parseErro
/* if the previous token was also a reset, */
/*this means that we have two consecutive resets */
/* and we want to remove the previous one if empty*/
if(ListList[src->resultLen-1].first == NULL) {
if(src->resultLen > 0 && ListList[src->resultLen-1].first == NULL) {
src->resultLen--;
}
}