From c93306a875e413df02e2e45c5ddc46d327ac4dcc Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Sat, 18 Sep 2021 10:48:58 +0800 Subject: [PATCH] TD-6129 fix json encode error --- src/common/inc/tdataformat.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/inc/tdataformat.h b/src/common/inc/tdataformat.h index ba9196c52a..f8cc374eb0 100644 --- a/src/common/inc/tdataformat.h +++ b/src/common/inc/tdataformat.h @@ -560,6 +560,8 @@ static FORCE_INLINE int tdAddColToKVRow(SKVRowBuilder *pBuilder, int16_t colId, char* jumpType = (char*)value; if(isJumpJsonVType) jumpType += CHAR_BYTES; int tlen = IS_VAR_DATA_TYPE(type) ? varDataTLen(jumpType) : TYPE_BYTES[type]; + if(isJumpJsonVType) tlen += CHAR_BYTES; // add type size + if (tlen > pBuilder->alloc - pBuilder->size) { while (tlen > pBuilder->alloc - pBuilder->size) { pBuilder->alloc *= 2; -- GitLab