From: Zefram Date: Tue, 11 Sep 2007 15:22:23 +0000 (-0700) Subject: [perl #45383] sprintf %f panics with NaN X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=03e3a31924f12b508d22debad27f3900a3277300;p=p5sagit%2Fp5-mst-13.2.git [perl #45383] sprintf %f panics with NaN From: Zefram (via RT) Message-ID: p4raw-id: //depot/perl@31854 --- diff --git a/sv.c b/sv.c index 5cc15b1..a2646f7 100644 --- a/sv.c +++ b/sv.c @@ -9194,7 +9194,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV : SvNV(argsv); need = 0; - if (c != 'e' && c != 'E') { + if (c != 'e' && c != 'E' && nv == nv) { i = PERL_INT_MIN; /* FIXME: if HAS_LONG_DOUBLE but not USE_LONG_DOUBLE this will cast our (long double) to (double) */