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 | 87f626ae6431c7b59980fb1138c8b231e36459d3 (patch) | |
tree | 82f3461ddf28f25e94e1318893fbcac8224656aa /mdoc_term.c | |
parent | c6666257b49db6fafacd3e238ad90baeb79952ad (diff) | |
download | mandoc-87f626ae6431c7b59980fb1138c8b231e36459d3.tar.gz mandoc-87f626ae6431c7b59980fb1138c8b231e36459d3.tar.zst mandoc-87f626ae6431c7b59980fb1138c8b231e36459d3.zip |
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 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index 8a600a7c..31af0040 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.48 2009/07/20 15:05:34 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.49 2009/07/20 19:30:46 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -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: |