From 6547acc2f00979c07c53588bffad9f8634582d41 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 26 Jan 2020 06:01:45 -0800 Subject: [PATCH] Plugins/Weather.pm: fix temps --- Plugins/Weather.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Weather.pm b/Plugins/Weather.pm index 7b406350..16aeea12 100644 --- a/Plugins/Weather.pm +++ b/Plugins/Weather.pm @@ -115,7 +115,7 @@ sub get_weather { sub fix_temps { my ($self, $text) = @_; - $text =~ s|(\d+)\s*F|my $f = $1; my $c = ($f - 32 ) * 5 / 9; $c = sprintf("%.1d", $c); "${f}F/${c}C"|eg; + $text =~ s|(-?\d+)\s*F|my $f = $1; my $c = ($f - 32 ) * 5 / 9; $c = sprintf("%.1d", $c); "${f}F/${c}C"|eg; return $text; }