diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-09-27 06:48:04 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-09-27 06:48:51 -0700 |
commit | 354b74ae6f54fdd18bcf40fc3afcdaddc8b2ca9d (patch) | |
tree | 89a0523c3d34a032b5b3daa08aaeffe4e2576f3b /pp.c | |
parent | 6625b4731a37f834cd655039c5b8c19bbed23dba (diff) | |
download | perl-354b74ae6f54fdd18bcf40fc3afcdaddc8b2ca9d.tar.gz |
[perl #12285] Fix str vs num inf/nan treatment
sprintf, pack and chr were treating 0+"Inf" and "Inf" differently,
even though they have the same string and numeric values.
pack was also croaking for 0+"Inf" passed to a string format.
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3394,7 +3394,7 @@ PP(pp_chr) SV *top = POPs; SvGETMAGIC(top); - if (SvNOK(top) && UNLIKELY(Perl_isinfnan(SvNV(top)))) + if (UNLIKELY(Perl_isinfnansv(top))) Perl_croak(aTHX_ "Cannot chr %"NVgf, SvNV(top)); else { if (!IN_BYTES /* under bytes, chr(-1) eq chr(0xff), etc. */ |