]> git.saurik.com Git - wxWidgets.git/commitdiff
Corrected off-by-one bug in wxRect(const wxPoint&, const wxPoint&) ctor
authorJulian Smart <julian@anthemion.co.uk>
Mon, 4 Sep 2000 06:58:30 +0000 (06:58 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 4 Sep 2000 06:58:30 +0000 (06:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/gdicmn.cpp

index ee750ee93bad83a8dac84cace8b79ab179b6db59..4e35df6256aef91de8f62dfdce132dc50c971454 100644 (file)
@@ -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)
   {