From 80245cc1be5bc8a9dd9092531f30f91f98b3d47f Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 28 Jan 2017 15:37:21 -0500 Subject: dfmt(): Fix radix point matching --- diff --git a/lib/Math/Decimal/FastPP.pm b/lib/Math/Decimal/FastPP.pm index 8db00a9..aed46c9 100644 --- a/lib/Math/Decimal/FastPP.pm +++ b/lib/Math/Decimal/FastPP.pm @@ -91,7 +91,7 @@ sub dfmt my $f; my $l; - ($s, $i, $f) = $a =~ m/^(-?)(\d*).?(\d*)$/; + ($s, $i, $f) = $a =~ m/^(-?)(\d*)[.]?(\d*)$/; $l = length($f); if ($i eq '') { $i = '0'; } if ($l < $p) { $f .= '0' x ($p - $l); } -- cgit v0.9.1