This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sprintf: handle sized int-ish formats with Inf/Nan
The code path taken when int-ish formats saw an Inf/Nan was to jump to the
floating-point handler, but then that would warn about (valid) size
qualifiers. For example before:
$ perl -we'printf "[%hi]\n", Inf'
Invalid conversion in printf: "%hi" at -e line 1.
Redundant argument in printf at -e line 1.
[%hi]
$
After this commit:
$ perl -we'printf "[%hi]\n", Inf'
[Inf]
$
It also makes the code simpler.