summaryrefslogtreecommitdiffstats
path: root/tbl_data.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-10 14:56:06 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-10 14:56:06 +0000
commit8a26b665a342bbb1c095e7556e69d0995f952fe8 (patch)
tree0b74b0b3401297bbe93ca53280d64382c277003b /tbl_data.c
parentdede963eacb17dcdbe0624bf76ab3f4045147541 (diff)
downloadmandoc-8a26b665a342bbb1c095e7556e69d0995f952fe8.tar.gz
Make dp->string always consist of a value.
Diffstat (limited to 'tbl_data.c')
-rw-r--r--tbl_data.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tbl_data.c b/tbl_data.c
index ecf3f1a1..6172bd4a 100644
--- a/tbl_data.c
+++ b/tbl_data.c
@@ -140,7 +140,6 @@ tbl_cdata(struct tbl_node *tbl, int ln, const char *p)
pos = 0;
dat = tbl->last_span->last;
- dat->pos = TBL_DATA_DATA;
if (p[pos] == 'T' && p[pos + 1] == '}') {
pos += 2;
@@ -156,6 +155,8 @@ tbl_cdata(struct tbl_node *tbl, int ln, const char *p)
/* Fallthrough: T} is part of a word. */
}
+ dat->pos = TBL_DATA_DATA;
+
if (dat->string) {
sz = strlen(p) + strlen(dat->string) + 2;
dat->string = mandoc_realloc(dat->string, sz);