update interfaces/cj/intl/src/intl_impl.cpp.

Signed-off-by: 小城茶语 <guorunzhi@huawei.com>
This commit is contained in:
小城茶语 2024-11-11 04:01:51 +00:00 committed by Gitee
parent 7b64eb5e21
commit b1f587cc96
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -257,7 +257,7 @@ CArrArrString RelativeTimeFormatImpl::FormatToParts(double number, char *unit)
CArrArrString ret = {.head = nullptr, .size = 0};
relativeTimeFmt_->FormatToParts(number, unitStr, timeVectorStr);
CArrString *res = static_cast<CArrString *>(malloc(sizeof(char ***) * timeVectorStr.size()));
CArrString *res = static_cast<CArrString *>(malloc(sizeof(CArrString) * timeVectorStr.size()));
if (res == nullptr) {
HILOG_ERROR_I18N("The CArrString is nullptr");
return ret;