summaryrefslogtreecommitdiffstats
path: root/runtime/msg.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/msg.c')
-rw-r--r--runtime/msg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index ec3dbfa1..a7df6928 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -2404,7 +2404,7 @@ jsonAddVal(uchar *pSrc, unsigned buflen, es_str_t **dst)
/* we hope we have only few escapes... */
*dst = es_newStr(buflen+10);
} else {
- *dst = es_newStrFromBuf((char*)pSrc, i-1);
+ *dst = es_newStrFromBuf((char*)pSrc, i);
}
if(*dst == NULL) {
ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY);