diff --git a/cocos/ui/UIScale9Sprite.cpp b/cocos/ui/UIScale9Sprite.cpp index dd10bd886c..914265a84f 100644 --- a/cocos/ui/UIScale9Sprite.cpp +++ b/cocos/ui/UIScale9Sprite.cpp @@ -1099,7 +1099,7 @@ namespace ui { topHeight = capInsets.origin.y - offsets.y; centerHeight = capInsets.size.height; - bottomHeight = originalSize.height - (capInsets.origin.x + centerHeight) - offsets.w; + bottomHeight = originalSize.height - (capInsets.origin.y + centerHeight) - offsets.w; }