mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Fix orange by exiting loop when bytes hits aMaxBytes rather than waiting for it to get farther.
This commit is contained in:
parent
fba298ee31
commit
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++;
|
||||
|
Loading…
Reference in New Issue
Block a user