ICU-10583 Fixed a minor problem in illegal lead byte handling in the UTF-8 charset recognizer.

X-SVN-Rev: 34856
This commit is contained in:
Yoshito Umaoka 2014-01-10 16:10:57 +00:00
parent 301814f85f
commit 13c6750194

View file

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 2005-2013, International Business Machines
* Copyright (C) 2005-2014, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/
@ -55,12 +55,7 @@ UBool CharsetRecog_UTF8::match(InputText* input, CharsetMatch *results) const {
trailBytes = 3;
} else {
numInvalid += 1;
if (numInvalid > 5) {
break;
}
trailBytes = 0;
continue;
}
// Verify that we've got the right number of trail bytes in the sequence