diff --git a/services/ui/driver/ui_rotation.cpp b/services/ui/driver/ui_rotation.cpp index ef48397601e9c918f2ce6f5e3d0616b19452daa2..6c805c716c40447953d41cc2b92953e303277490 100644 --- a/services/ui/driver/ui_rotation.cpp +++ b/services/ui/driver/ui_rotation.cpp @@ -108,8 +108,8 @@ void UiRotation::RotateBuffer(const uint8_t *origBuf, uint8_t *dstBuf, uint32_t int x {}, y {}; const uint8_t *srcP = nullptr; uint8_t *dstP = nullptr; - for (int h = rect_.GetTop(); h < rect_.GetBottom(); h++) { - for (int w = rect_.GetLeft(); w < rect_.GetRight(); w++) { + for (int h = rect_.GetTop(); h <= rect_.GetBottom(); h++) { + for (int w = rect_.GetLeft(); w <= rect_.GetRight(); w++) { x = offsetX_ + w * cosR_ - h * sinR_; y = offsetY_ + h * cosR_ + w * sinR_; srcP = origBuf + h * oldRowBytes_ + w * pixelBytes_;