diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-03 21:34:00 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-05-03 21:34:00 +0300 |
commit | b65bfa7564f564f85d3c595c6c1030af2acf5056 (patch) | |
tree | a9283acdd6ba00d61d9f52a804529f388f1f80c1 /src | |
parent | ed838ca0467f7cc9745b042099b568cdf0f2b835 (diff) | |
download | grecs-b65bfa7564f564f85d3c595c6c1030af2acf5056.tar.gz grecs-b65bfa7564f564f85d3c595c6c1030af2acf5056.tar.bz2 |
Minor fix.
* src/format.c (grecs_format_value): Fix quoting (missed trailing 0).
Diffstat (limited to 'src')
-rw-r--r-- | src/format.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/format.c b/src/format.c index 96cdb0e..2c97b72 100644 --- a/src/format.c +++ b/src/format.c | |||
@@ -226,6 +226,7 @@ grecs_format_value(struct grecs_value *val, int flags, FILE *fp) | |||
226 | char *cbuf = grecs_malloc(clen + 1); | 226 | char *cbuf = grecs_malloc(clen + 1); |
227 | wordsplit_c_quote_copy(cbuf, val->v.string, | 227 | wordsplit_c_quote_copy(cbuf, val->v.string, |
228 | flags & GRECS_NODE_FLAG_QUOTE_HEX); | 228 | flags & GRECS_NODE_FLAG_QUOTE_HEX); |
229 | cbuf[clen] = 0; | ||
229 | fprintf(fp, "\"%s\"", cbuf); | 230 | fprintf(fp, "\"%s\"", cbuf); |
230 | free(cbuf); | 231 | free(cbuf); |
231 | } else | 232 | } else |