aboutsummaryrefslogtreecommitdiffstats
path: root/libdevcore
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-06-14 02:12:45 +0800
committerchriseth <chris@ethereum.org>2017-06-16 22:41:29 +0800
commitd7e63f23decdaf83aa4872a6e0b2754a3d69d4a6 (patch)
tree4fecd3ab7f05416a1fbb465d7f40dabb6d9b2f8d /libdevcore
parent17de4a0756ad86b6facbf592dce2a4c32ef7585c (diff)
downloaddexon-solidity-d7e63f23decdaf83aa4872a6e0b2754a3d69d4a6.tar
dexon-solidity-d7e63f23decdaf83aa4872a6e0b2754a3d69d4a6.tar.gz
dexon-solidity-d7e63f23decdaf83aa4872a6e0b2754a3d69d4a6.tar.bz2
dexon-solidity-d7e63f23decdaf83aa4872a6e0b2754a3d69d4a6.tar.lz
dexon-solidity-d7e63f23decdaf83aa4872a6e0b2754a3d69d4a6.tar.xz
dexon-solidity-d7e63f23decdaf83aa4872a6e0b2754a3d69d4a6.tar.zst
dexon-solidity-d7e63f23decdaf83aa4872a6e0b2754a3d69d4a6.zip
Fix UTF-8 validation for high codepoints (>10000)
Diffstat (limited to 'libdevcore')
-rw-r--r--libdevcore/UTF8.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdevcore/UTF8.cpp b/libdevcore/UTF8.cpp
index 9fbf4b45..449ccc5d 100644
--- a/libdevcore/UTF8.cpp
+++ b/libdevcore/UTF8.cpp
@@ -40,7 +40,7 @@ bool validateUTF8(std::string const& _input, size_t& _invalidPosition)
continue;
size_t count = 0;
- switch(_input[i] & 0xe0) {
+ switch(_input[i] & 0xf0) {
case 0xc0: count = 1; break;
case 0xe0: count = 2; break;
case 0xf0: count = 3; break;