summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB')
-rw-r--r--LedgerSMB/Form.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index 920870ca..60d0ec19 100644
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -793,6 +793,9 @@ sub parse_amount {
my $decimalplaces = length $1 + length $2;
$amount = new Math::BigFloat($amount);
+ if ($amount->is_nan){
+ $self->error("Invalid number detected during parsing");
+ }
return ( $amount * 1 );
}