diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-09-24 13:03:32 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-09-24 13:03:32 +0000 |
commit | 81c9a3f1c3d4a64b4404c010ceda364c2afd9e7c (patch) | |
tree | 3a29277c304a82861246c998d6b623a5a624e7f5 /mdoc_argv.c | |
parent | 0371d94639d271317d0697e7eefe5cb79df85fb7 (diff) | |
download | mandoc-81c9a3f1c3d4a64b4404c010ceda364c2afd9e7c.tar.gz |
-offset string can now be blank (supplied with 6n as stipulated by mdoc.samples).
Diffstat (limited to 'mdoc_argv.c')
-rw-r--r-- | mdoc_argv.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mdoc_argv.c b/mdoc_argv.c index 20a9dc5e..e0919c7a 100644 --- a/mdoc_argv.c +++ b/mdoc_argv.c @@ -60,7 +60,7 @@ static int mdoc_argvflags[MDOC_ARG_MAX] = { ARGV_NONE, /* MDOC_Unfilled */ ARGV_NONE, /* MDOC_Literal */ ARGV_NONE, /* MDOC_File */ - ARGV_SINGLE, /* MDOC_Offset */ + ARGV_OPT_SINGLE, /* MDOC_Offset */ ARGV_NONE, /* MDOC_Bullet */ ARGV_NONE, /* MDOC_Dash */ ARGV_NONE, /* MDOC_Hyphen */ @@ -309,9 +309,13 @@ mdoc_argv_free(struct mdoc_arg *p) for (i = 0; i < (int)p->argc; i++) { if (0 == p->argv[i].sz) continue; + if (NULL == p->argv[i].value) + continue; + /* LINTED */ for (j = 0; j < (int)p->argv[i].sz; j++) - free(p->argv[i].value[j]); + if (p->argv[i].value[j]) + free(p->argv[i].value[j]); free(p->argv[i].value); } |