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 | 990f2948716e92073cda230ae7cb74006e41f10e (patch) | |
tree | bc3ba59b6b3e601f5392b6be8dd6c8af590c5d9e /pp.c | |
parent | 3f745a60a6901e21ecc143a6d650fdc66ab0d8f5 (diff) | |
download | perl-990f2948716e92073cda230ae7cb74006e41f10e.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; } |