diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-07-20 19:30:46 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-07-20 19:30:46 +0000 |
commit | 2dc2a327e697845a8247a40ea444c56668789309 (patch) | |
tree | b7cabafcf1729b57dfde3f316a0eb827a0dcfa80 /mdoc_term.c | |
parent | 21a0f9a1a5bc29abdffea3529d79a09932397e4a (diff) | |
download | mandoc-2dc2a327e697845a8247a40ea444c56668789309.tar.gz |
Fixed zero-length width string causing assertion (defaulting to 10 -- this needs work).
Diffstat (limited to 'mdoc_term.c')
-rw-r--r-- | mdoc_term.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index fb3a3658..293c6501 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -798,6 +798,8 @@ termp_it_pre(DECL_ARGS) if (0 == width) width = 8; break; + case (MDOC_Column): + /* FALLTHROUGH */ case (MDOC_Tag): if (0 == width) width = 10; @@ -916,12 +918,14 @@ termp_it_pre(DECL_ARGS) case (MDOC_Hang): /* FALLTHROUGH */ case (MDOC_Tag): + assert(width); if (MDOC_HEAD == node->type) p->rmargin = p->offset + width; else p->offset += width; break; case (MDOC_Column): + assert(width); p->rmargin = p->offset + width; break; default: |