summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utf8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utf8.c b/utf8.c
index 4684fdb033..e3bda6e81e 100644
--- a/utf8.c
+++ b/utf8.c
@@ -387,8 +387,8 @@ Perl_uvoffuni_to_utf8_flags_msgs(pTHX_ U8 *d, UV uv, const UV flags, HV** msgs)
STRLEN len = OFFUNISKIP(uv);
U8 *p = d+len-1;
while (p > d) {
- *p-- = I8_TO_NATIVE_UTF8((uv & UTF_CONTINUATION_MASK) | UTF_CONTINUATION_MARK);
- uv >>= UTF_ACCUMULATION_SHIFT;
+ *p-- = I8_TO_NATIVE_UTF8((uv & MASK) | MARK);
+ uv >>= SHIFT;
}
*p = I8_TO_NATIVE_UTF8((uv & UTF_START_MASK(len)) | UTF_START_MARK(len));
return d+len;