summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-10-21 18:42:57 +0100
committerNicholas Clark <nick@ccl4.org>2009-10-21 21:53:11 +0100
commitcbc1fc82d0122a787bd36a9859ec1a21fe883045 (patch)
treec41fb61be22ab81f04e1cd2ca1c15013c629b622 /utf8.c
parent5cc814fd5c2c076b31431eb7a8f9e17719c5baae (diff)
downloadperl-cbc1fc82d0122a787bd36a9859ec1a21fe883045.tar.gz
Perl_utf16_to_utf8() should return the correct length when being "understanding"
("be understanding" being a bodge added in 1de9afcdf18cf98b, which will soon go when I fix the underlying cause of the bugs it works around.)
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utf8.c b/utf8.c
index 6907b7e212..dc12df845a 100644
--- a/utf8.c
+++ b/utf8.c
@@ -961,7 +961,7 @@ Perl_utf16_to_utf8(pTHX_ U8* p, U8* d, I32 bytelen, I32 *newlen)
if (bytelen == 1 && p[0] == 0) { /* Be understanding. */
d[0] = 0;
*newlen = 1;
- return d;
+ return d + 1;
}
if (bytelen & 1)