diff options
author | Cem Keylan <cem@ckyln.com> | 2020-10-19 13:43:05 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-10-19 13:43:05 +0300 |
commit | 75666cb76815ffd35a30153c6cabc53601e9e2de (patch) | |
tree | 89385348ea2708d9371704e188bcd1004d7a589a /usr.bin/mandoc/tbl_layout.c | |
parent | 2171aa6ddbd6f9cbec58ac40ae0b5e511d1b871a (diff) | |
download | otools-75666cb76815ffd35a30153c6cabc53601e9e2de.tar.gz |
usr.bin: update to 6.8
Diffstat (limited to 'usr.bin/mandoc/tbl_layout.c')
-rw-r--r-- | usr.bin/mandoc/tbl_layout.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/mandoc/tbl_layout.c b/usr.bin/mandoc/tbl_layout.c index aae36d9..d7ecf3b 100644 --- a/usr.bin/mandoc/tbl_layout.c +++ b/usr.bin/mandoc/tbl_layout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tbl_layout.c,v 1.35 2018/12/14 05:17:45 schwarze Exp $ */ +/* $OpenBSD: tbl_layout.c,v 1.36 2020/09/01 18:24:10 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2012, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -63,6 +63,7 @@ mods(struct tbl_node *tbl, struct tbl_cell *cp, int ln, const char *p, int *pos) { char *endptr; + unsigned long spacing; size_t sz; mod: @@ -91,7 +92,11 @@ mod: /* Parse numerical spacing from modifier string. */ if (isdigit((unsigned char)p[*pos])) { - cp->spacing = strtoull(p + *pos, &endptr, 10); + if ((spacing = strtoul(p + *pos, &endptr, 10)) > 9) + mandoc_msg(MANDOCERR_TBLLAYOUT_SPC, ln, *pos, + "%lu", spacing); + else + cp->spacing = spacing; *pos = endptr - p; goto mod; } |