X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..b3cec67186d678d2c3985923bdb8c787455cf369:/src/generic/grid.cpp diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 6cd125e280..2ce9f06c70 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -1144,7 +1144,8 @@ wxGridStringTable::wxGridStringTable( int numRows, int numCols ) wxString wxGridStringTable::GetValue( int row, int col ) { - wxCHECK_MSG( (row < GetNumberRows()) && (col < GetNumberCols()), + wxCHECK_MSG( (row >= 0 && row < GetNumberRows()) && + (col >= 0 && col < GetNumberCols()), wxEmptyString, wxT("invalid row or column index in wxGridStringTable") ); @@ -1153,7 +1154,8 @@ wxString wxGridStringTable::GetValue( int row, int col ) void wxGridStringTable::SetValue( int row, int col, const wxString& value ) { - wxCHECK_RET( (row < GetNumberRows()) && (col < GetNumberCols()), + wxCHECK_RET( (row >= 0 && row < GetNumberRows()) && + (col >= 0 && col < GetNumberCols()), wxT("invalid row or column index in wxGridStringTable") ); m_data[row][col] = value;