From f410dc896c662d4754aa40cc58e465bd64aebf06 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Thu, 30 Jul 2009 01:00:24 +0000 Subject: [PATCH] small tweak to double check that only valid temp data gets used in regex --- inxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inxi b/inxi index 5ccbf6c..0f9286d 100755 --- a/inxi +++ b/inxi @@ -3095,7 +3095,7 @@ get_sensors_data() # final fallback if all else fails, funtoo user showed sensors putting # temp on wrapped second line, not handled - /^(core0|core 0)(.*)\+([0-9]+)(.*)[ \t°](C|F)/ { + /^(core0|core 0)(.*)\+([0-9]+)(.*)[ \t°](C|F)/ && $2 ~ /^[ \t]*\+([0-9]+)/ { tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 ) if ( core0Temp == "" || tempWorking > 0 ) { core0Temp=tempWorking