X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/314260fbd07ecebb43c60d147e1f4580a7159e42..d9f9aa2d8fcb956444588b2c19ffe8d4a3f5d2bb:/src/html/search.cpp?ds=inline diff --git a/src/html/search.cpp b/src/html/search.cpp index 78df71a708..bd7b156944 100644 --- a/src/html/search.cpp +++ b/src/html/search.cpp @@ -37,11 +37,11 @@ void wxSearchEngine::LookFor(const wxString& keyword) { if (m_Keyword) delete[] m_Keyword; - m_Keyword = new char[keyword.Length() + 1]; - strcpy(m_Keyword, keyword.c_str()); - for (int i = strlen(m_Keyword) - 1; i >= 0; i--) - if ((m_Keyword[i] >= 'A') && (m_Keyword[i] <= 'Z')) - m_Keyword[i] += 'a' - 'A'; + m_Keyword = new wxChar[keyword.Length() + 1]; + wxStrcpy(m_Keyword, keyword.c_str()); + for (int i = wxStrlen(m_Keyword) - 1; i >= 0; i--) + if ((m_Keyword[i] >= wxT('A')) && (m_Keyword[i] <= wxT('Z'))) + m_Keyword[i] += wxT('a') - wxT('A'); } @@ -52,7 +52,7 @@ bool wxSearchEngine::Scan(wxInputStream *stream) int i, j; int lng = stream ->GetSize(); - int wrd = strlen(m_Keyword); + int wrd = wxStrlen(m_Keyword); bool found = FALSE; char *buf = new char[lng + 1]; stream -> Read(buf, lng);