summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/src/parse.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/src/parse.c b/src/src/parse.c
index acece9b78..2b2ffd341 100644
--- a/src/src/parse.c
+++ b/src/src/parse.c
@@ -904,8 +904,13 @@ for (s = string; len > 0; s++, len--)
{ g = string_catn(g, s, 1); first_byte = FALSE; }
}
-g = string_catn(g, US"?=", 2);
-return coded ? string_from_gstring(g) : string;
+if (coded)
+ string = string_from_gstring(g = string_catn(g, US"?=", 2));
+else
+ g->ptr = -1;
+
+gstring_release_unused(g);
+return string;
}