summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-10-22 13:30:03 +0100
committerNicholas Clark <nick@ccl4.org>2009-10-22 13:30:03 +0100
commit26cc780bb8911dcc1e2c3e971db95322db3e2d9f (patch)
treec504372fad1cbe92f56d901ca3f78830ec0d3f59 /utf8.c
parentc28d61051c446453c532f387d478df78d6f95c55 (diff)
downloadperl-26cc780bb8911dcc1e2c3e971db95322db3e2d9f.tar.gz
Perl_utf16_to_utf8() should treat "\0" like any every other odd-length input.
The "be understanding" bodge to not panic, introduced in 1de9afcdf18cf98b, is no longer needed now that c28d61051c446453 fixes the underlying problem.
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/utf8.c b/utf8.c
index dc12df845a..c50489115e 100644
--- a/utf8.c
+++ b/utf8.c
@@ -958,12 +958,6 @@ Perl_utf16_to_utf8(pTHX_ U8* p, U8* d, I32 bytelen, I32 *newlen)
PERL_ARGS_ASSERT_UTF16_TO_UTF8;
- if (bytelen == 1 && p[0] == 0) { /* Be understanding. */
- d[0] = 0;
- *newlen = 1;
- return d + 1;
- }
-
if (bytelen & 1)
Perl_croak(aTHX_ "panic: utf16_to_utf8: odd bytelen %"UVuf, (UV)bytelen);