X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f3c8285953e9e92229e1ff65cac135fdb60e789c..fb6261e9ba8b162347135a9174afbc81244b10cc:/src/html/htmlpars.cpp diff --git a/src/html/htmlpars.cpp b/src/html/htmlpars.cpp index 4cec1c5cd1..213bd0f75b 100644 --- a/src/html/htmlpars.cpp +++ b/src/html/htmlpars.cpp @@ -15,7 +15,7 @@ #include "wx/wxprec.h" #include "wx/defs.h" -#if wxUSE_HTML +#if wxUSE_HTML && wxUSE_STREAMS #ifdef __BORDLANDC__ #pragma hdrstop @@ -69,11 +69,11 @@ void wxHtmlParser::DoneParser() -#define wxHTML_MAX_BUFLEN 1024 void wxHtmlParser::DoParsing(int begin_pos, int end_pos) { - char temp[wxHTML_BUFLEN], c; + char c; + char *temp = new char[end_pos - begin_pos + 1]; int i; int templen; @@ -86,11 +86,6 @@ void wxHtmlParser::DoParsing(int begin_pos, int end_pos) // continue building word: if (c != '<') { temp[templen++] = c; - if (templen == wxHTML_BUFLEN-1) { - temp[templen] = 0; - AddText(temp); - templen = 0; - } i++; } @@ -112,6 +107,7 @@ void wxHtmlParser::DoParsing(int begin_pos, int end_pos) temp[templen] = 0; AddText(temp); } + delete[] temp; }