fix 342886 crash when removing the last tag on a message after adding and removing the last tag before, sr=mscott

This commit is contained in:
bienvenu%nventure.com 2006-06-30 01:25:37 +00:00
parent a0bfaf1da4
commit 4ededa78e4
2 changed files with 7 additions and 0 deletions

View File

@ -360,6 +360,11 @@ nsresult nsMsgDBView::AppendKeywordProperties(const char *keywords, nsISupportsA
// append that as a property.
nsCStringArray keywordsArray;
nsCAutoString color;
// skip leading spaces
while (*keywords == ' ')
keywords++;
if (!*keywords)
return NS_OK;
keywordsArray.ParseString(keywords, " ");
nsresult rv;
if (!mTagService)

View File

@ -1243,6 +1243,8 @@ PRBool MsgFindKeyword(const nsACString &keyword, nsACString &keywords, nsACStrin
{
if (*end == ' ')
end++;
if (*beforeStart == ' ' && endMatches)
start--;
return PR_TRUE;
}
else