X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4d223b670407f32abd3ca962ec08fdc0da2df3f8..4df78dc36e933fb1c3aa7c9d7ae2757a898ae05c:/src/html/htmltag.cpp diff --git a/src/html/htmltag.cpp b/src/html/htmltag.cpp index 9f36d68957..65253c20aa 100644 --- a/src/html/htmltag.cpp +++ b/src/html/htmltag.cpp @@ -25,6 +25,7 @@ #endif #include +#include // for vsscanf #include @@ -63,7 +64,7 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source) i++; } dummy[i] = 0; - m_Cache[tg].Name = (char*) malloc(i+1); + m_Cache[tg].Name = new char[i+1]; memcpy(m_Cache[tg].Name, dummy, i+1); while (src[pos] != '>') pos++; @@ -88,7 +89,7 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source) // ok, we're done, now we'll free .Name members of cache - we don't need it anymore: for (i = 0; i < m_CacheSize; i++) { - free(m_Cache[i].Name); + delete[] m_Cache[i].Name; m_Cache[i].Name = NULL; } }