(buf)
| 66926 | // behavior. The continuation byte check is included three times in the case |
| 66927 | // where all of the continuation bytes for a character exist in the same buffer. |
| 66928 | // It is also done this way as a slight performance increase instead of using a |
| 66929 | // loop. |
| 66930 | function utf8CheckExtraBytes(self, buf, p) { |
| 66931 | if ((buf[0] & 0xC0) !== 0x80) { |
| 66932 | self.lastNeed = 0; |
| 66933 | return '\ufffd'; |
| 66934 | } |
| 66935 | if (self.lastNeed > 1 && buf.length > 1) { |
| 66936 | if ((buf[1] & 0xC0) !== 0x80) { |
| 66937 | self.lastNeed = 1; |
| 66938 | return '\ufffd'; |
| 66939 | } |
| 66940 | if (self.lastNeed > 2 && buf.length > 2) { |
| 66941 | if ((buf[2] & 0xC0) !== 0x80) { |
nothing calls this directly
no test coverage detected