diff --git a/src/gui/rhi/qrhi_p_p.h b/src/gui/rhi/qrhi_p_p.h index 95f04fbd1b..729b85c4d5 100644 --- a/src/gui/rhi/qrhi_p_p.h +++ b/src/gui/rhi/qrhi_p_p.h @@ -267,9 +267,9 @@ bool qrhi_toTopLeftRenderTargetRect(const QSize &outputSize, const std::array(0, inputHeight - heightOffset); if (*x + *w > outputWidth) - *w = qMax(0, outputWidth - *x - 1); + *w = qMax(0, outputWidth - *x); if (*y + *h > outputHeight) - *h = qMax(0, outputHeight - *y - 1); + *h = qMax(0, outputHeight - *y); return true; }