From ac59a478186ad85c520785bfb9372757f0e25290 Mon Sep 17 00:00:00 2001
From: ElTata <eltata@firemail.cc>
Date: Wed, 22 Jul 2020 19:33:28 +0200
Subject: [PATCH] fix: ttl regex in real_gain

---
 Irpg/Classes/Farmer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Irpg/Classes/Farmer.pm b/Irpg/Classes/Farmer.pm
index b936cb3..be4e60e 100644
--- a/Irpg/Classes/Farmer.pm
+++ b/Irpg/Classes/Farmer.pm
@@ -82,7 +82,7 @@ sub steal_def {
 sub real_gain {
 	# to apply on TTL modificators
 	my ($self, $time) = @_;
-	return unless ($time =~ m/^-?\d+(?:\.\d+$)?/);
+	return unless ($time =~ m/^-?\d+(?:\.\d+)?$/);
 	$time = $time >= 0 ?
 		$time*(1-($self->cha()-1)/50):	# add less time
 		$time*(1+($self->cha()-1)/50);	# remove more time
-- 
GitLab