summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Wellons <wellons@nullprogram.com>2017-10-06 10:12:05 -0400
committerChristopher Wellons <wellons@nullprogram.com>2017-10-06 10:12:05 -0400
commitdca0eda3474931849efc1a5c2516a813c501b5d5 (patch)
tree482641cdb30cfb31e0216bd9de9cfced25c2e78c
parent6c3750fc0406ac136dbc7b2a78858cc5d8184ba9 (diff)
Pass the recovery tests
-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