aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/UniConversion.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2012-05-26 13:53:54 +1000
committernyamatongwe <devnull@localhost>2012-05-26 13:53:54 +1000
commitc5f0f81d3d8a43f6adee004c0d0f0fd9e532ea41 (patch)
tree9971605099078081bee1b32bbb3e591ae4cf8aca /src/UniConversion.cxx
parent645d0f2b7c5ebad6d757e35cd257bcbf4a118f68 (diff)
downloadscintilla-mirror-c5f0f81d3d8a43f6adee004c0d0f0fd9e532ea41.tar.gz
Reduce code to avoid warning from cppcheck.
Diffstat (limited to 'src/UniConversion.cxx')
-rw-r--r--src/UniConversion.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/UniConversion.cxx b/src/UniConversion.cxx
index 40ac982c9..ffe67f75c 100644
--- a/src/UniConversion.cxx
+++ b/src/UniConversion.cxx
@@ -240,11 +240,9 @@ int UTF8Classify(const unsigned char *us, int len) {
} else {
return UTF8MaskInvalid | 1;
}
- } else if (*us >= 0xc0) {
- // Overlong encoding
- return UTF8MaskInvalid | 1;
} else {
- // Trail byte
+ // 0xc0 .. 0xc1 is overlong encoding
+ // 0x80 .. 0xbf is trail byte
return UTF8MaskInvalid | 1;
}
}