!40064 waterflow:capi异常值检测

Merge pull request !40064 from gxjhl/0809capi
This commit is contained in:
openharmony_ci 2024-08-09 12:06:33 +00:00 committed by Gitee
commit fef8931f8a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -77,6 +77,9 @@ void OH_ArkUI_WaterFlowSectionOption_SetCrossCount(
if (index < 0) {
return;
}
if (crossCount <= 0) {
crossCount = 1;
}
auto size = static_cast<int32_t>(option->sections.size());
if (size == 0 || size <= index + 1) {
option->sections.resize(static_cast<uint32_t>(index + 1));