diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-19 07:23:48 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-19 07:23:48 +0000 |
commit | aa6ffa1650ac66b040000b508f9d85569d9fe839 (patch) | |
tree | bc3ba59b6b3e601f5392b6be8dd6c8af590c5d9e /pp.c | |
parent | 4673fc70de29ec9782a54acc86b498189e02a8e2 (diff) | |
download | perl-aa6ffa1650ac66b040000b508f9d85569d9fe839.tar.gz |
allocate sufficient buffer sizes for 64-bit wide utf8 characters
permitted by change#5011 (from Gisle Aas)
p4raw-link: @5011 on //depot/perl: 3c77ea2bace63b1ad27d15a6366cb938bdd158cb
p4raw-id: //depot/perl@5136
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2202,13 +2202,13 @@ PP(pp_chr) (void)SvUPGRADE(TARG,SVt_PV); if (value > 255 && !IN_BYTE) { - SvGROW(TARG,8); + SvGROW(TARG, UTF8_MAXLEN+1); tmps = SvPVX(TARG); tmps = (char*)uv_to_utf8((U8*)tmps, (UV)value); SvCUR_set(TARG, tmps - SvPVX(TARG)); *tmps = '\0'; - SvUTF8_on(TARG); (void)SvPOK_only(TARG); + SvUTF8_on(TARG); XPUSHs(TARG); RETURN; } |