mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-11-21 03:13:05 +08:00
Fix "too many arguments" messages not to index off the end of argv[].
This affects initdb, clusterdb, reindexdb, and vacuumdb in master and 9.2; in earlier branches, only initdb is affected.
This commit is contained in:
parent
f98d8d59a1
commit
63ea46f5db
@ -2571,7 +2571,7 @@ main(int argc, char *argv[])
|
||||
if (optind < argc)
|
||||
{
|
||||
fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
|
||||
progname, argv[optind + 1]);
|
||||
progname, argv[optind]);
|
||||
fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
|
||||
progname);
|
||||
exit(1);
|
||||
|
Loading…
Reference in New Issue
Block a user