fix(util): reset the returned length value.

This commit is contained in:
Haojun Liao 2024-10-10 16:21:11 +08:00
parent 975cb9c907
commit 255a3e9258
1 changed files with 3 additions and 0 deletions

View File

@ -2610,7 +2610,10 @@ int32_t dumpBlockData(SSDataBlock* pDataBlock, const char* flag, char** pDataBuf
if (code < 0) {
uError("func %s failed to convert to ucs charset since %s", __func__, tstrerror(code));
goto _exit;
} else { // reset the length value
code = TSDB_CODE_SUCCESS;
}
len += snprintf(dumpBuf + len, size - len, " %15s |", pBuf);
if (len >= size - 1) goto _exit;
} break;