summaryrefslogtreecommitdiffabout
path: root/src
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-03 18:34:00 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-05-03 18:34:00 (GMT)
commitb65bfa7564f564f85d3c595c6c1030af2acf5056 (patch) (side-by-side diff)
treea9283acdd6ba00d61d9f52a804529f388f1f80c1 /src
parented838ca0467f7cc9745b042099b568cdf0f2b835 (diff)
downloadgrecs-b65bfa7564f564f85d3c595c6c1030af2acf5056.tar.gz
grecs-b65bfa7564f564f85d3c595c6c1030af2acf5056.tar.bz2
Minor fix.
* src/format.c (grecs_format_value): Fix quoting (missed trailing 0).
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/format.c1
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)
char *cbuf = grecs_malloc(clen + 1);
wordsplit_c_quote_copy(cbuf, val->v.string,
flags & GRECS_NODE_FLAG_QUOTE_HEX);
+ cbuf[clen] = 0;
fprintf(fp, "\"%s\"", cbuf);
free(cbuf);
} else

Return to:

Send suggestions and report system problems to the System administrator.