Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CleanupCharBreak()

void System.Xml.EncodingStreamWrapper.CleanupCharBreak ( )
inlineprivate

Definition at line 648 of file EncodingStreamWrapper.cs.

649 {
650 int num = _byteOffset + _byteCount;
651 if (_byteCount % 2 != 0)
652 {
653 int num2 = _stream.ReadByte();
654 if (num2 < 0)
655 {
657 }
658 _bytes[num++] = (byte)num2;
659 _byteCount++;
660 }
661 int num3 = ((_encodingCode != SupportedEncoding.UTF16LE) ? (_bytes[num - 1] + (_bytes[num - 2] << 8)) : (_bytes[num - 2] + (_bytes[num - 1] << 8)));
662 if ((num3 & 0xDC00) != 56320 && num3 >= 55296 && num3 <= 56319)
663 {
664 int num4 = _stream.ReadByte();
665 int num5 = _stream.ReadByte();
666 if (num5 < 0)
667 {
669 }
670 _bytes[num++] = (byte)num4;
671 _bytes[num++] = (byte)num5;
672 _byteCount += 2;
673 }
674 }
virtual int ReadByte()
Definition Stream.cs:994
static string UnexpectedEndOfFile
Definition SR.cs:292
Definition SR.cs:7

References System.Xml.EncodingStreamWrapper._byteCount, System.Xml.EncodingStreamWrapper._byteOffset, System.Xml.EncodingStreamWrapper._bytes, System.Xml.EncodingStreamWrapper._encodingCode, System.Xml.EncodingStreamWrapper._stream, System.Xml.Dictionary, System.IO.Stream.ReadByte(), System.SR.UnexpectedEndOfFile, and System.Xml.XmlException.

Referenced by System.Xml.EncodingStreamWrapper.EncodingStreamWrapper(), and System.Xml.EncodingStreamWrapper.Read().