summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utf8.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/utf8.h b/utf8.h
index 257dfa3..d359952 100644
--- a/utf8.h
+++ b/utf8.h
@@ -53,7 +53,7 @@ utf8_decode(void *buf, long *c, int *e) {
*e ^= 0x2aU; // top two bits of each tail byte correct?
*e >>= shifte[len];
- return s + len;
+ return s + len + !len;
}
#endif