From 9a0a4e03d0f561e5dd84808ee1a44c2f36a88061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Sat, 24 Feb 2024 14:02:19 +0100 Subject: [PATCH] Ensure -t argument is positive integer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolás Ortega Froysa --- pacundo.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pacundo.pl b/pacundo.pl index d93352a..e02e187 100755 --- a/pacundo.pl +++ b/pacundo.pl @@ -68,6 +68,9 @@ if ($opts{'v'}) { print("Improper usage. -r and -i cannot be used at the same time.\n"); print("Use -h for help information.\n"); exit 1; +} elsif ($opts{'t'} && !($opts{'t'} =~ /[0-9]+/)) { + print("The argument for -t must be a positive integer.\n"); + exit 1; } $r_flag = 1 if ($opts{'r'});