From 514ae2d38972ae13058ee40c9feccf68982d34fc Mon Sep 17 00:00:00 2001 From: ElTata <eltata@firemail.cc> Date: Wed, 3 Jun 2020 10:06:13 +0200 Subject: [PATCH] bugfix : sub real_gain() matches decimal numbers --- Irpg/Classes/Farmer.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Irpg/Classes/Farmer.pm b/Irpg/Classes/Farmer.pm index 06c395b..7512195 100644 --- a/Irpg/Classes/Farmer.pm +++ b/Irpg/Classes/Farmer.pm @@ -83,6 +83,7 @@ sub real_gain { # to apply on TTL modificators my ($self, $time) = @_; return unless ($time =~ m/^-?\d+$/); + return unless ($time =~ m/^-?\d+(?:\.\d+$)?/); $time = $time >= 0 ? $time*(1-($self->cha()-1)/20): # add less time $time*(1+($self->cha()-1)/20); # remove more time -- GitLab