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

◆ ReadTextAndWatchForInvalidCharacters()

int System.Xml.XmlUTF8TextReader.ReadTextAndWatchForInvalidCharacters ( byte[] buffer,
int offset,
int offsetMax )
inlineprivate

Definition at line 722 of file XmlUTF8TextReader.cs.

723 {
724 byte[] array = s_charType;
725 int num = offset;
726 while (offset < offsetMax && ((array[buffer[offset]] & 8u) != 0 || buffer[offset] == 239))
727 {
728 if (buffer[offset] != 239)
729 {
730 offset++;
731 continue;
732 }
733 if (offset + 2 < offsetMax)
734 {
736 {
737 offset += 3;
738 }
739 else
740 {
741 XmlExceptionHelper.ThrowXmlException(this, new XmlException(System.SR.XmlInvalidFFFE));
742 }
743 continue;
744 }
745 if (base.BufferReader.Offset < offset)
746 {
747 break;
748 }
749 base.BufferReader.GetBuffer(3, out var _);
750 }
751 return offset - num;
752 }
static string XmlInvalidFFFE
Definition SR.cs:428
Definition SR.cs:7
bool IsNextCharacterNonFFFE(byte[] buffer, int offset)
static readonly byte[] s_charType

References System.array, System.buffer, System.Xml.Dictionary, System.Xml.XmlUTF8TextReader.IsNextCharacterNonFFFE(), System.offset, System.Xml.XmlUTF8TextReader.s_charType, System.Xml.XmlExceptionHelper.ThrowXmlException(), System.Xml.XmlException, and System.SR.XmlInvalidFFFE.

Referenced by System.Xml.XmlUTF8TextReader.ReadText().