From c0f7527e02c14105085b5054b895c575654a8101 Mon Sep 17 00:00:00 2001
From: "B. Watson" <urchlay@slackware.uk>
Date: Tue, 9 Apr 2024 16:08:58 -0400
Subject: soxdial: handle invalid numerics like .5.5 without warnings.

---
 soxdial | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/soxdial b/soxdial
index b5837ea..a2684b2 100755
--- a/soxdial
+++ b/soxdial
@@ -425,18 +425,24 @@ sub make_sox_cmd {
 # support either seconds (possibly with decimal point, e.g. 0.5) or
 # milliseconds (e.g. 500ms).
 sub parse_sec {
+	no warnings "numeric";
 	$_ = shift || 0;
 	if(/^(.+)ms$/) {
 		$_ = $1 / 1000;
+	} else {
+		$_ += 0;
 	}
 	return $_;
 }
 
 # support either Hz (e.g. 8000) or KHz (e.g. 8k or 8K).
 sub parse_rate {
+	no warnings "numeric";
 	$_ = shift || 0;
 	if(/^(.+)k$/i) {
 		$_ = $1 * 1000;
+	} else {
+		$_ += 0;
 	}
 	return $_;
 }
-- 
cgit v1.2.3