Bug 93066 - Don't use FindCharInSet when searching for only one character. r=sspitzer, sr=alecf

This commit is contained in:
bratell%lysator.liu.se 2002-11-15 08:16:43 +00:00
Родитель 2ecabcccc4
Коммит f784304b06
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -1886,7 +1886,7 @@ mime_decompose_file_init_fn ( void *stream_closure, MimeHeaders *headers )
// the content type may contain a charset. i.e. text/html; ISO-2022-JP...we want to strip off the charset
// before we ask the mime service for a mime info for this content type.
nsCAutoString contentType (newAttachment->type);
PRInt32 pos = contentType.FindCharInSet(";");
PRInt32 pos = contentType.FindChar(';');
if (pos > 0)
contentType.Truncate(pos);
nsresult rv = NS_OK;

Просмотреть файл

@ -274,7 +274,7 @@ ValidateRealName(nsMsgAttachmentData *aAttach, MimeHeaders *aHdrs)
nsString newAttachName(NS_LITERAL_STRING("attachment"));
nsresult rv = NS_OK;
nsCAutoString contentType (aAttach->real_type);
PRInt32 pos = contentType.FindCharInSet(";");
PRInt32 pos = contentType.FindChar(';');
if (pos > 0)
contentType.Truncate(pos);