malloc() --> new[]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
1999-08-03 23:59:38 +00:00
parent a547ebffd6
commit 2776d7c3bd
6 changed files with 30 additions and 30 deletions

View File

@@ -140,11 +140,11 @@ wxString wxHtmlFilterHTML::ReadFile(const wxFSFile& file) const
wxString doc;
if (s == NULL) return wxEmptyString;
src = (char*) malloc(s -> GetSize() + 1);
src = new char[s -> GetSize() + 1];
src[s -> GetSize()] = 0;
s -> Read(src, s -> GetSize());
doc = src;
free(src);
delete[] src;
return doc;
}