aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2024-01-29 22:39:33 +0100
committerDaniel Stenberg <daniel@haxx.se>2024-01-30 08:24:32 +0100
commit3e57bc2a84887eb96b0f47ccbe39aa5624192b8b (patch)
treeb3c8953a1092546a2f0916d3240ce0584bffd896
parent011325ff29638bfaa498c1a930950437c4e7dd62 (diff)
downloadcurl-3e57bc2a84887eb96b0f47ccbe39aa5624192b8b.tar.gz
cd2nroff: fix duplicate output issue
Assisted-by: Jay Satiro Fixes https://github.com/curl/curl-www/issues/321 Closes #12818
-rwxr-xr-xscripts/cd2nroff8
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/cd2nroff b/scripts/cd2nroff
index bbc7969a3..e8c8235dd 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 {