Don't accept invalid values for rows/columns in wxGBSpan ctor.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Feb 2011 12:32:48 +0000 (12:32 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Feb 2011 12:32:48 +0000 (12:32 +0000)
commit1b3b63ed5b05e7fc0f0d88ccdaa4c087c53bfa04
tree39a8c822d525691607a6df42ac7fd8f3bac124b6
parent359cde15e07bd684c9175b51c04ab02c9ee40745
Don't accept invalid values for rows/columns in wxGBSpan ctor.

wxGBSpan must have strictly positive row and column span as otherwise the grid
bag sizer code could enter an infinite loop trying to exceed a negative number
which it casted to an unsigned one. And while the cast itself is incorrect too
the program still behaves undesirably (produces a lot of asserts in debug
build and then crashes or crashes directly in release) if a zero size span is
used so it seems better to prevent this from happening.

Closes #12934.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/gbsizer.h