提交 e1d7b76a 编写于 作者: D dapan1121

fix: array dup issue

上级 5ae95f36
...@@ -312,7 +312,11 @@ SArray* taosArrayFromList(const void* src, size_t size, size_t elemSize) { ...@@ -312,7 +312,11 @@ SArray* taosArrayFromList(const void* src, size_t size, size_t elemSize) {
} }
SArray* taosArrayDup(const SArray* pSrc, __array_item_dup_fn_t fn) { SArray* taosArrayDup(const SArray* pSrc, __array_item_dup_fn_t fn) {
if (NULL == pSrc || pSrc->size == 0) { // empty array list if (NULL == pSrc) {
return NULL;
}
if (pSrc->size == 0) { // empty array list
return taosArrayInit(8, pSrc->elemSize); return taosArrayInit(8, pSrc->elemSize);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册