aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitbf4bddcd274b710f5c5b77eb76f1d129507f43de (patch)
treefde08d6a9a1b294aa2c72a388334de261c24930f /tbl_data.c
parentb3ea03504ba905470ba5c486ba69062c89034488 (diff)
downloadmandoc-bf4bddcd274b710f5c5b77eb76f1d129507f43de.tar.gz
mandoc-bf4bddcd274b710f5c5b77eb76f1d129507f43de.tar.zst
mandoc-bf4bddcd274b710f5c5b77eb76f1d129507f43de.zip
Make dp->string always consist of a value.
Diffstat (limited to 'tbl_data.c')
-rw-r--r--tbl_data.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tbl_data.c b/tbl_data.c
index c7bca649..e30f1959 100644
--- a/tbl_data.c
+++ b/tbl_data.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_data.c,v 1.16 2011/01/10 14:40:30 kristaps Exp $ */
+/* $Id: tbl_data.c,v 1.17 2011/01/10 14:56:06 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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);