This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5cc814f
)
Perl_utf16_to_utf8() should return the correct length when being "understanding"
author
Nicholas Clark
<nick@ccl4.org>
Wed, 21 Oct 2009 17:42:57 +0000
(18:42 +0100)
committer
Nicholas Clark
<nick@ccl4.org>
Wed, 21 Oct 2009 20:53:11 +0000
(21:53 +0100)
("be understanding" being a bodge added in
1de9afcdf18cf98b
, which will soon go
when I fix the underlying cause of the bugs it works around.)
utf8.c
patch
|
blob
|
blame
|
history
diff --git
a/utf8.c
b/utf8.c
index
6907b7e
..
dc12df8
100644
(file)
--- 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)