diff --git a/src/client/src/tscLocalMerge.c b/src/client/src/tscLocalMerge.c index 89642a067d46d8742ed060292f64e7ca9e8c9cc3..851f7398db23d04c48c0846a307c715432b73b99 100644 --- a/src/client/src/tscLocalMerge.c +++ b/src/client/src/tscLocalMerge.c @@ -1159,9 +1159,10 @@ static void fillMultiRowsOfTagsVal(SQueryInfo *pQueryInfo, int32_t numOfRes, SLo memset(buf, 0, (size_t)maxBufSize); memcpy(buf, pCtx->pOutput, (size_t)pCtx->outputBytes); + char* next = pCtx->pOutput; for (int32_t i = 0; i < inc; ++i) { - pCtx->pOutput += pCtx->outputBytes; - memcpy(pCtx->pOutput, buf, (size_t)pCtx->outputBytes); + next += pCtx->outputBytes; + memcpy(next, buf, (size_t)pCtx->outputBytes); } }