=================================================================== RCS file: /cvs/mandoc/tbl_layout.c,v retrieving revision 1.14 retrieving revision 1.16 diff -u -p -r1.14 -r1.16 --- mandoc/tbl_layout.c 2011/01/10 14:40:30 1.14 +++ mandoc/tbl_layout.c 2011/01/11 14:12:01 1.16 @@ -1,4 +1,4 @@ -/* $Id: tbl_layout.c,v 1.14 2011/01/10 14:40:30 kristaps Exp $ */ +/* $Id: tbl_layout.c,v 1.16 2011/01/11 14:12:01 kristaps Exp $ */ /* * Copyright (c) 2009, 2010 Kristaps Dzonsons * @@ -122,7 +122,7 @@ mod: } *pos += i; - cp->spacing = atoi(buf); + cp->spacing = (size_t)atoi(buf); goto mod; /* NOTREACHED */ @@ -218,6 +218,16 @@ cell(struct tbl_node *tbl, struct tbl_row *rp, default: break; } + } + + /* + * If a vertical spanner is found, we may not be in the first + * row. + */ + + if (TBL_CELL_DOWN == c && rp == tbl->first_row) { + TBL_MSG(tbl, MANDOCERR_TBLLAYOUT, ln, *pos); + return(0); } (*pos)++;