mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
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:
parent
301814f85f
commit
13c6750194
1 changed files with 2 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue