diff options
author | P. J. McDermott <pj@pehjota.net> | 2017-01-28 15:37:21 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2017-01-28 15:37:21 (EST) |
commit | 80245cc1be5bc8a9dd9092531f30f91f98b3d47f (patch) | |
tree | 54f3f68d45cabf719d856e0f067b86205bb14f20 /lib | |
parent | c8ebbb9159f95f22c70a66d5b1131dd2b2ff9b4b (diff) | |
download | Math-Decimal-FastPP-80245cc1be5bc8a9dd9092531f30f91f98b3d47f.zip Math-Decimal-FastPP-80245cc1be5bc8a9dd9092531f30f91f98b3d47f.tar.gz Math-Decimal-FastPP-80245cc1be5bc8a9dd9092531f30f91f98b3d47f.tar.bz2 |
dfmt(): Fix radix point matching
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Math/Decimal/FastPP.pm | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |