From bd7d2bf147463616e4fddb47453bf2c85364680d Mon Sep 17 00:00:00 2001 From: "bienvenu%netscape.com" Date: Tue, 30 Apr 2002 16:43:26 +0000 Subject: [PATCH] fix hang starting mail, sr=alecf 141162 git-svn-id: svn://10.0.0.236/trunk@120305 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/base/util/nsMsgUtils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mozilla/mailnews/base/util/nsMsgUtils.cpp b/mozilla/mailnews/base/util/nsMsgUtils.cpp index 168a721f3d2..0062a2fa5c2 100644 --- a/mozilla/mailnews/base/util/nsMsgUtils.cpp +++ b/mozilla/mailnews/base/util/nsMsgUtils.cpp @@ -303,7 +303,7 @@ nsresult NS_MsgCreatePathStringFromFolderURI(const char *folderURI, nsCString& p PRInt32 startSlashPos = oldPath.FindChar('/'); PRInt32 endSlashPos = (startSlashPos >= 0) ? oldPath.FindChar('/', startSlashPos + 1) - 1 : oldPath.Length() - 1; - if (endSlashPos == -1) + if (endSlashPos < 0) endSlashPos = oldPath.Length(); // trick to make sure we only add the path to the first n-1 folders PRBool haveFirst=PR_FALSE; @@ -327,10 +327,10 @@ nsresult NS_MsgCreatePathStringFromFolderURI(const char *folderURI, nsCString& p endSlashPos = (startSlashPos >= 0) ? oldPath.FindChar('/', startSlashPos + 1) - 1: oldPath.Length() - 1; - if (endSlashPos == -1) + if (endSlashPos < 0) endSlashPos = oldPath.Length(); - if (startSlashPos == endSlashPos) + if (startSlashPos >= endSlashPos) break; }