diff options
author | nyamatongwe <devnull@localhost> | 2012-05-26 13:53:54 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2012-05-26 13:53:54 +1000 |
commit | c5f0f81d3d8a43f6adee004c0d0f0fd9e532ea41 (patch) | |
tree | 9971605099078081bee1b32bbb3e591ae4cf8aca | |
parent | 645d0f2b7c5ebad6d757e35cd257bcbf4a118f68 (diff) | |
download | scintilla-mirror-c5f0f81d3d8a43f6adee004c0d0f0fd9e532ea41.tar.gz |
Reduce code to avoid warning from cppcheck.
-rw-r--r-- | src/UniConversion.cxx | 6 |
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; } } |