summaryrefslogtreecommitdiffstats
path: root/src/json.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/json.c b/src/json.c
index aae6f5d..bcf0d10 100644
--- a/src/json.c
+++ b/src/json.c
@@ -18,6 +18,7 @@ char * dc_json (struct dc_json * j, const char * in, int ln) { /* detects start/
if (j->ready > 0)
memmove(j->buf, j->buf+j->ready, strlen(j->buf+j->ready)+1);
j->buf[0] = j->backup;
+ j->ready = 0;
}
size_t bufstrlen = strlen(j->buf); /* could optimize and cache it into the struct */
if (ln == -1)