mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
man-generator: fix buffer length calculation
This commit is contained in:
parent
25c841af00
commit
d823c65d50
@ -2299,7 +2299,7 @@ static void print_def_man(struct command_name *cname, int opt_enum, struct arg_d
|
|||||||
static const char *_emit_long_opt_name(char *buf, const char *long_opt_name, size_t len)
|
static const char *_emit_long_opt_name(char *buf, const char *long_opt_name, size_t len)
|
||||||
{
|
{
|
||||||
strcpy(buf, "\\-\\-");
|
strcpy(buf, "\\-\\-");
|
||||||
strncat(buf, long_opt_name + 2, strlen(buf) - 1);
|
strncat(buf, long_opt_name + 2, len - strlen(buf) - 1);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user