X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a1b806b98241ab649c169aaa1f134df85e80fb8b..7bc740719c93355e447db5c9bcb24cf7cdc29b61:/src/html/m_tables.cpp diff --git a/src/html/m_tables.cpp b/src/html/m_tables.cpp index 7bca5a4c3f..825329b2ca 100644 --- a/src/html/m_tables.cpp +++ b/src/html/m_tables.cpp @@ -288,7 +288,7 @@ void wxHtmlTableCell::AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag) { 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 ) { @@ -704,7 +704,7 @@ TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH") { 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);