зеркало из https://github.com/mozilla/gecko-dev.git
Fix orange by exiting loop when bytes hits aMaxBytes rather than waiting for it to get farther.
This commit is contained in:
Родитель
fba298ee31
Коммит
d4e20c5288
|
@ -276,7 +276,7 @@ UTF8InputStream::CountValidUTF8Bytes(const char* aBuffer, PRInt32 aMaxBytes)
|
|||
const char *lastchar = aBuffer;
|
||||
|
||||
PRInt32 bytes = 0;
|
||||
while (*c && bytes <= aMaxBytes) {
|
||||
while (*c && bytes < aMaxBytes) {
|
||||
lastchar = c;
|
||||
if (UTF8traits::isASCII(*c)) {
|
||||
c++;
|
||||
|
|
Загрузка…
Ссылка в новой задаче