Guest User

Untitled

a guest
Jul 17th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. --- src/org/apache/xerces/impl/io/UTF8Reader.java 2006-11-23 00:36:53.000000000 +0100
  2. +++ ../../xerces-2_9_0/src/org/apache/xerces/impl/io/UTF8Reader.java 2007-06-28 02:02:44.000000000 +0200
  3. @@ -534,6 +534,16 @@
  4. invalidByte(4, 4, b2);
  5. }
  6.  
  7. + // check if output buffer is large enough to hold 2 surrogate chars
  8. + if(out + 1 >= ch.length ){
  9. + fBuffer[0] = (byte)b0;
  10. + fBuffer[1] = (byte)b1;
  11. + fBuffer[2] = (byte)b2;
  12. + fBuffer[3] = (byte)b3;
  13. + fOffset = 4;
  14. + return out - offset;
  15. + }
  16. +
  17. // decode bytes into surrogate characters
  18. int uuuuu = ((b0 << 2) & 0x001C) | ((b1 >> 4) & 0x0003);
  19. if (uuuuu > 0x10) {
Add Comment
Please, Sign In to add comment