From 7d964efbac97e6ff8f14417ad6cacef6722c3280 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 24 Mar 2018 14:16:41 +1100 Subject: Backport: Removed unreachable branches in UTF8Classify. Backport of changeset 6647:f81b6f34bf07. --- src/UniConversion.cxx | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src') diff --git a/src/UniConversion.cxx b/src/UniConversion.cxx index f2bf8d30f..6789c1c64 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