summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sv.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 288a1e8031..eee50a2292 100644
--- a/sv.c
+++ b/sv.c
@@ -12007,6 +12007,20 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
elen = width;
}
}
+ else if (Perl_isinf(nv)) {
+ if (nv > 0.0) {
+ elen = 4;
+ Copy("Inf", PL_efloatbuf, elen, char);
+ }
+ else {
+ elen = 5;
+ Copy("-Inf", PL_efloatbuf, elen, char);
+ }
+ }
+ else if (Perl_isnan(nv)) {
+ elen = 4;
+ Copy("NaN", PL_efloatbuf, elen, char);
+ }
else {
char *ptr = ebuf + sizeof ebuf;
*--ptr = '\0';