From d18a93e943b4552890a0e603b9fc7db5a6fd7761 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 29 Aug 2012 16:00:20 +0200 Subject: default outname for $! is now without $! prefix also some type cleanup and simplification --- runtime/msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/msg.c') diff --git a/runtime/msg.c b/runtime/msg.c index 6725203c..187f0c22 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -2577,9 +2577,9 @@ jsonField(struct templateEntry *pTpe, uchar **ppRes, unsigned short *pbMustBeFre pSrc = *ppRes; buflen = (*pBufLen == -1) ? ustrlen(pSrc) : *pBufLen; /* we hope we have only few escapes... */ - dst = es_newStr(buflen+es_strlen(pTpe->fieldName)+15); + dst = es_newStr(buflen+pTpe->lenFieldName+15); es_addChar(&dst, '"'); - es_addStr(&dst, pTpe->fieldName); + es_addBuf(&dst, (char*)pTpe->fieldName, pTpe->lenFieldName); es_addBufConstcstr(&dst, "\":\""); CHKiRet(jsonAddVal(pSrc, buflen, &dst)); es_addChar(&dst, '"'); -- cgit v1.2.3