Always initialize wxGridCellBoolEditor::m_value
Do it even when the cell value is not one of the recognized boolean representations, as we later use m_value as an index into a 2 element array and leaving it uninitialized could result in an out of bound access, so make sure this doesn't happen.
This commit is contained in:
@@ -1430,6 +1430,9 @@ void wxGridCellBoolEditor::SetValueFromGrid(int row, int col, wxGrid* grid)
|
|||||||
// this risks to be very surprising for the user code, let them
|
// this risks to be very surprising for the user code, let them
|
||||||
// know about it
|
// know about it
|
||||||
wxFAIL_MSG( wxT("invalid value for a cell with bool editor!") );
|
wxFAIL_MSG( wxT("invalid value for a cell with bool editor!") );
|
||||||
|
|
||||||
|
// Still need to initialize it to something.
|
||||||
|
m_value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user