fixed bug 6597 and added memory allocation conditioning

This commit is contained in:
rickg@netscape.com
1999-05-19 05:01:46 +00:00
parent 8d6cf2a48f
commit fc107fc38c
46 changed files with 226 additions and 290 deletions
+4 -2
View File
@@ -462,8 +462,10 @@ void nsHTMLToTXTSinkStream::EnsureBufferSize(PRInt32 aNewSize)
delete [] mBuffer;
mBufferSize = 2*aNewSize+1; // make the twice as large
mBuffer = new char[mBufferSize];
mBuffer[0] = 0;
mBufferLength = 0;
if(mBuffer){
mBuffer[0] = 0;
mBufferLength = 0;
}
}
}