ICU-3718 Don't read before the array (Fix from Ram)

X-SVN-Rev: 15547
This commit is contained in:
George Rhoten 2004-05-25 23:36:03 +00:00
parent d47ca6208c
commit b8b164bb73

View file

@ -402,7 +402,7 @@ _internal_toUnicode(const UChar* src, int32_t srcLength,
}
srcLength++;
}
}else{
}else if(srcLength > 0){
for(int32_t j=0; j<srcLength; j++){
if(src[j]> 0x7f){
srcIsASCII = FALSE;
@ -414,6 +414,8 @@ _internal_toUnicode(const UChar* src, int32_t srcLength,
failPos = j;
}
}
}else{
return 0;
}
if(srcIsASCII == FALSE){