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

◆ InternalFallback() [1/2]

unsafe int System.Text.DecoderFallbackBufferHelper.InternalFallback ( byte[] bytes,
byte * pBytes )
inlinepackage

Definition at line 73 of file DecoderFallbackBufferHelper.cs.

74 {
75 if (_fallbackBuffer.Fallback(bytes, (int)(pBytes - byteStart - bytes.Length)))
76 {
77 int num = 0;
78 bool flag = false;
79 char nextChar;
80 while ((nextChar = _fallbackBuffer.GetNextChar()) != 0)
81 {
82 if (char.IsSurrogate(nextChar))
83 {
84 if (char.IsHighSurrogate(nextChar))
85 {
86 if (flag)
87 {
89 }
90 flag = true;
91 }
92 else
93 {
94 if (!flag)
95 {
97 }
98 flag = false;
99 }
100 }
101 num++;
102 }
103 if (flag)
104 {
106 }
107 return num;
108 }
109 return 0;
110 }
static string Argument_InvalidCharSequenceNoIndex
Definition SR.cs:92
Definition SR.cs:7
bool Fallback(byte[] bytesUnknown, int index)

References System.Text.DecoderFallbackBufferHelper._fallbackBuffer, System.SR.Argument_InvalidCharSequenceNoIndex, System.bytes, System.Text.DecoderFallbackBufferHelper.byteStart, System.Text.DecoderFallbackBuffer.Fallback(), and System.Text.DecoderFallbackBuffer.GetNextChar().