This is an automated email from the ASF dual-hosted git repository. nickva pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git
commit 3282a1a7d6498ffdd506b21336e4d7a038e3c8d9 Author: Nick Vatamaniuc <[email protected]> AuthorDate: Wed Mar 18 19:16:03 2026 -0400 Add a missing else in utf8 validation The code worked just fine previously, just did an extra comparison. --- c_src/utf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_src/utf8.c b/c_src/utf8.c index c8c96b1..1176857 100644 --- a/c_src/utf8.c +++ b/c_src/utf8.c @@ -119,7 +119,7 @@ utf8_validate(unsigned char* data, size_t size) if((data[0] & 0x80) == 0x00) { ulen = 1; - } if((data[0] & 0xE0) == 0xC0) { + } else if((data[0] & 0xE0) == 0xC0) { ulen = 2; } else if((data[0] & 0xF0) == 0xE0) { ulen = 3;
