Skip to content

Commit 39cf726

Browse files
committed
fix mrc_str_escape
1 parent c811c06 commit 39cf726

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cdump.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ static mrc_string*
105105
mrc_str_escape(mrc_ccontext *c, mrc_string *s)
106106
{
107107
mrc_string *s2 = mrc_str_new_capa(c, s->len*2+1);
108+
mrc_str_cat_lit(c, s2, "\"");
108109
if (s2) {
109110
for (size_t i=0; i<s->len; i++) {
110111
char ch = s->ptr[i];
@@ -114,6 +115,7 @@ mrc_str_escape(mrc_ccontext *c, mrc_string *s)
114115
mrc_str_cat_lit(c, s2, &ch);
115116
}
116117
}
118+
mrc_str_cat_lit(c, s2, "\"");
117119
return s2;
118120
}
119121

0 commit comments

Comments
 (0)