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

◆ ReadMultiByteUInt31()

int System.Xml.XmlBufferReader.ReadMultiByteUInt31 ( )
inline

Definition at line 310 of file XmlBufferReader.cs.

311 {
312 int @byte = GetByte();
313 Advance(1);
314 if ((@byte & 0x80) == 0)
315 {
316 return @byte;
317 }
318 @byte &= 0x7F;
319 int byte2 = GetByte();
320 Advance(1);
321 @byte |= (byte2 & 0x7F) << 7;
322 if ((byte2 & 0x80) == 0)
323 {
324 return @byte;
325 }
326 int byte3 = GetByte();
327 Advance(1);
328 @byte |= (byte3 & 0x7F) << 14;
329 if ((byte3 & 0x80) == 0)
330 {
331 return @byte;
332 }
333 int byte4 = GetByte();
334 Advance(1);
335 @byte |= (byte4 & 0x7F) << 21;
336 if ((byte4 & 0x80) == 0)
337 {
338 return @byte;
339 }
340 int byte5 = GetByte();
341 Advance(1);
342 @byte |= byte5 << 28;
343 if (((uint)byte5 & 0xF8u) != 0)
344 {
345 XmlExceptionHelper.ThrowInvalidBinaryFormat(_reader);
346 }
347 return @byte;
348 }
readonly XmlDictionaryReader _reader

References System.Xml.XmlBufferReader._reader, System.Xml.XmlBufferReader.Advance(), System.Xml.XmlBufferReader.GetByte(), and System.Xml.XmlExceptionHelper.ThrowInvalidBinaryFormat().

Referenced by System.Xml.XmlBufferReader.ReadDictionaryKey().