From: Julian Smart Date: Mon, 4 Sep 2000 06:58:30 +0000 (+0000) Subject: Corrected off-by-one bug in wxRect(const wxPoint&, const wxPoint&) ctor X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/736b80cd76cd7770c29987c2c289975ae891a5b8?ds=inline Corrected off-by-one bug in wxRect(const wxPoint&, const wxPoint&) ctor git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index ee750ee93b..4e35df6256 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -67,8 +67,8 @@ wxRect::wxRect(const wxPoint& topLeft, const wxPoint& bottomRight) { x = topLeft.x; y = topLeft.y; - width = bottomRight.x - topLeft.x; - height = bottomRight.y - topLeft.y; + width = bottomRight.x - topLeft.x + 1; + height = bottomRight.y - topLeft.y + 1; if (width < 0) {