badwords.pl: fix variable in printf mask

Causing warnings if a matched line has mask patterns.

Closes #19534
This commit is contained in:
Viktor Szakats 2025-11-14 17:57:03 +01:00
parent 231e8a71e1
commit 7bb59a7dc7
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -94,7 +94,7 @@ sub file {
}
print STDERR "$f:$l:$c: error: found bad word \"$w\"\n";
printf STDERR " %4d | $in\n", $l;
printf STDERR " %4d | %s\n", $l, $in;
printf STDERR " | %*s^%s\n", length($p), " ",
"~" x (length($w)-1);
printf STDERR " maybe use \"%s\" instead?\n", $alt{$w};