]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/htmltag.cpp
PCX handler now working for reading (8bit and 24bit images).
[wxWidgets.git] / src / html / htmltag.cpp
index 9f36d6895782bc4f7d8f6c607eea1509cd6d7f3e..65253c20aaf7389156a8fce8951872a2c570b516 100644 (file)
@@ -25,6 +25,7 @@
 #endif
 
 #include <wx/html/htmltag.h>
+#include <stdio.h> // for vsscanf
 #include <stdarg.h>
 
 
@@ -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;
     }
 }