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") );
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;