From 111520bdd074d4d71951f4f569b32dcdc457cbb3 Mon Sep 17 00:00:00 2001 From: "bnesse%netscape.com" Date: Wed, 29 Aug 2001 22:26:37 +0000 Subject: [PATCH] Fix for bug 64964. Eliminate assertions by checking for 0 length string first. r=ccarlen, sr=sfraser,a=asa. --- profile/pref-migrator/src/nsPrefMigration.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profile/pref-migrator/src/nsPrefMigration.cpp b/profile/pref-migrator/src/nsPrefMigration.cpp index 5ffbe2b07489..c73a5877238a 100644 --- a/profile/pref-migrator/src/nsPrefMigration.cpp +++ b/profile/pref-migrator/src/nsPrefMigration.cpp @@ -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; }