Fix for bug 64964. Eliminate assertions by checking for 0 length string first. r=ccarlen, sr=sfraser,a=asa.

This commit is contained in:
bnesse%netscape.com 2001-08-29 22:26:37 +00:00
parent 4455f41365
commit 111520bdd0

View File

@ -1640,8 +1640,8 @@ Fix4xCookies(nsIFileSpec * profilePath) {
while (GetCookieLine(inStream,inBuffer) != -1){
/* skip line if it is a comment or null line */
if (inBuffer.CharAt(0) == '#' || inBuffer.CharAt(0) == nsCRT::CR ||
inBuffer.CharAt(0) == nsCRT::LF || inBuffer.CharAt(0) == 0) {
if (inBuffer.Length() == 0 || inBuffer.CharAt(0) == '#' ||
inBuffer.CharAt(0) == nsCRT::CR || inBuffer.CharAt(0) == nsCRT::LF) {
PutCookieLine(outStream, inBuffer);
continue;
}