X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3444e4a8f9c29ab501a65d2a0ffcd0c04de52371..a83ea9c15a7ac7bbdc6686164cfcbbc21ae5031a:/src/html/helpdata.cpp diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp index 5f9d39ea19..9d5e70638d 100644 --- a/src/html/helpdata.cpp +++ b/src/html/helpdata.cpp @@ -78,6 +78,11 @@ wxHtmlHelpIndexCompareFunc(wxHtmlHelpDataItem **a, wxHtmlHelpDataItem **b) wxHtmlHelpDataItem *ia = *a; wxHtmlHelpDataItem *ib = *b; + if (ia == NULL) + return -1; + if (ib == NULL) + return 1; + if (ia->parent == ib->parent) { return ia->name.CmpNoCase(ib->name); @@ -681,7 +686,7 @@ bool wxHtmlHelpData::AddBook(const wxString& book) lineptr = ReadLine(lineptr, linebuf, 300); for (wxChar *ch = linebuf; *ch != wxT('\0') && *ch != wxT('='); ch++) - *ch = tolower(*ch); + *ch = (wxChar)wxTolower(*ch); if (wxStrstr(linebuf, _T("title=")) == linebuf) title = linebuf + wxStrlen(_T("title="));