Bug 1602816 - followup - Fix wrong buffersize passed into EncodingDetector, when guessing attachment charsets. r=mkmelin
This commit is contained in:
Родитель
4c8cf3ed87
Коммит
970e1940dd
|
@ -1791,7 +1791,7 @@ NS_MSG_BASE nsresult MsgDetectCharsetFromFile(nsIFile *aFile,
|
|||
numRead = 0;
|
||||
while (NS_SUCCEEDED(inputStream->Read(buffer, sizeof(buffer), &numRead))) {
|
||||
mozilla::Span<const uint8_t> src =
|
||||
mozilla::AsBytes(mozilla::MakeSpan(buffer, sizeof(buffer)));
|
||||
mozilla::AsBytes(mozilla::MakeSpan(buffer, numRead));
|
||||
Unused << detector->Feed(src, false);
|
||||
if (numRead == 0) {
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче