diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-10 14:56:06 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-10 14:56:06 +0000 |
commit | bf4bddcd274b710f5c5b77eb76f1d129507f43de (patch) | |
tree | fde08d6a9a1b294aa2c72a388334de261c24930f /tbl_data.c | |
parent | b3ea03504ba905470ba5c486ba69062c89034488 (diff) | |
download | mandoc-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |