Guard against accessing invalid string element.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72843
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
wxString wd = tag.GetParam(wxT("WIDTH"));
- if (wd[wd.length()-1] == wxT('%'))
+ if (!wd.empty() && wd[wd.length()-1] == wxT('%'))
{
if ( wxSscanf(wd.c_str(), wxT("%i%%"), &m_ColsInfo[c].width) == 1 )
{
{
wxString wd = tag.GetParam(wxT("WIDTH"));
- if (wd[wd.length()-1] == wxT('%'))
+ if (!wd.empty() && wd[wd.length()-1] == wxT('%'))
{
int width = 0;
wxSscanf(wd.c_str(), wxT("%i%%"), &width);