From: Stefan Neis Date: Sat, 7 Sep 2002 12:46:39 +0000 (+0000) Subject: Fixed bug in CoordToRowOrCol. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7fbc642095744d757b3ff7ba96ce893cf3b7875e Fixed bug in CoordToRowOrCol. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index c4b0556161..837f7e3252 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -7259,7 +7259,7 @@ static int CoordToRowOrCol(int coord, int defaultDist, int minDist, i_min = 0; if (BorderArray.IsEmpty()) { - return i_max; + return maxOnOverflow ? (int)i_max : -1; } if ( i_max >= BorderArray.GetCount())