add the null-terminated char for binary data
add the null-terminated char for the binary data, if the space if available.
This commit is contained in:
parent
bcc3261776
commit
212aae5316
|
@ -312,6 +312,10 @@ int32_t tsParseOneColumnData(SSchema *pSchema, SSQLToken *pToken, char *payload,
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(payload, pToken->z, pToken->n);
|
strncpy(payload, pToken->z, pToken->n);
|
||||||
|
|
||||||
|
if (pToken->n < pSchema->bytes) {
|
||||||
|
payload[pToken->n] = 0; // add the null-terminated char if the length of the string is shorter than the available space
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue