зеркало из https://github.com/mozilla/gecko-dev.git
Bug 93066 - Don't use FindCharInSet when searching for only one character. r=sspitzer, sr=alecf
This commit is contained in:
Родитель
2ecabcccc4
Коммит
f784304b06
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче