Skip to content

Commit 7130e62

Browse files
committed
clar: pass a string for a %s format placeholder
When `clar_parse_args()` encounters an unhandled command-line option, it wants to print out an error message that says so, and show the option that it encountered. However, the format claims that it wants to show a string, whereas using `argument[1]` provided only the first character. This was side-stepped in upstream `clar` in 7eaea8b2da (clar: argument parsing improvements, 2025-01-16) by not even showing the option anymore. Let's just fix this in Git until the next time Git synchronizes with an upstream `clar` version again. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 76d27a6 commit 7130e62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/unit-tests/clar/clar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ clar_parse_args(int argc, char **argv)
558558

559559
default:
560560
clar_abort("Unexpected commandline argument '%s'.\n",
561-
argument[1]);
561+
argument);
562562
}
563563
}
564564
}

0 commit comments

Comments
 (0)