cd2nroff: fix duplicate output issue

Assisted-by: Jay Satiro
Fixes https://github.com/curl/curl-www/issues/321
Closes #12818
This commit is contained in:
Daniel Stenberg 2024-01-29 22:39:33 +01:00
parent 011325ff29
commit 3e57bc2a84
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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 {