From 4692de654d0e973f6ceed4b00d7859ef9b6af254 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 24 Mar 2018 14:16:41 +1100 Subject: Removed unreachable branches in UTF8Classify. --- src/UniConversion.cxx | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src') diff --git a/src/UniConversion.cxx b/src/UniConversion.cxx index de86b0b76..16a9cef8a 100644 --- a/src/UniConversion.cxx +++ b/src/UniConversion.cxx @@ -275,14 +275,6 @@ int UTF8Classify(const unsigned char *us, int len) { // Check if encoding a value beyond the last Unicode character 10FFFF if (us[1] > 0x8f) { return UTF8MaskInvalid | 1; - } else if (us[1] == 0x8f) { - if (us[2] > 0xbf) { - return UTF8MaskInvalid | 1; - } else if (us[2] == 0xbf) { - if (us[3] > 0xbf) { - return UTF8MaskInvalid | 1; - } - } } } else if ((*us == 0xf0) && ((us[1] & 0xf0) == 0x80)) { // Overlong -- cgit v1.2.3