From 3e57bc2a84887eb96b0f47ccbe39aa5624192b8b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 29 Jan 2024 22:39:33 +0100 Subject: [PATCH] cd2nroff: fix duplicate output issue Assisted-by: Jay Satiro Fixes https://github.com/curl/curl-www/issues/321 Closes #12818 --- scripts/cd2nroff | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/cd2nroff b/scripts/cd2nroff index bbc7969a39..e8c8235dd2 100755 --- a/scripts/cd2nroff +++ b/scripts/cd2nroff @@ -337,14 +337,12 @@ sub single { return $errors; } -$f = $ARGV[0]; -if(defined($f)) { - while($f) { - $r = single($f); +if(@ARGV) { + for my $f (@ARGV) { + my $r = single($f); if($r) { exit $r; } - $f = shift @ARGV; } } else { -- 2.47.3