!7125 修改浮点数校验

Merge pull request !7125 from liuqi/local
This commit is contained in:
openharmony_ci 2024-07-02 04:45:22 +00:00 committed by Gitee
commit 66a992ed49
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -753,7 +753,7 @@ void WindowLayoutPolicyCascade::UpdateFloatingWindowSizeForStretchableWindow(con
const auto& sizeLimits = node->GetWindowUpdatedSizeLimits();
float scale = std::min(static_cast<float>(winRect.width_) / sizeLimits.minWidth_,
static_cast<float>(winRect.height_) / sizeLimits.minHeight_);
if (scale == 0) {
if (MathHelper::NearZero(scale)) {
WLOGE("invalid sizeLimits");
return;
}