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

◆ CheckBounds()

void System.Reflection.Internal.MemoryBlock.CheckBounds ( int offset,
int byteCount )
inlineprivate

Definition at line 45 of file MemoryBlock.cs.

46 {
47 if ((ulong)((long)(uint)offset + (long)(uint)byteCount) > (ulong)Length)
48 {
49 Throw.OutOfBounds();
50 }
51 }

References System.byteCount, System.Reflection.Internal.MemoryBlock.Length, System.offset, and System.Reflection.Throw.OutOfBounds().

Referenced by System.Reflection.Internal.MemoryBlock.CompareUtf8NullTerminatedStringWithAsciiString(), System.Reflection.Internal.MemoryBlock.GetMemoryBlockAt(), System.Reflection.Internal.MemoryBlock.GetUtf8NullTerminatedLength(), System.Reflection.Internal.MemoryBlock.IndexOf(), System.Reflection.Internal.MemoryBlock.PeekByte(), System.Reflection.Internal.MemoryBlock.PeekBytes(), System.Reflection.Internal.MemoryBlock.PeekCompressedInteger(), System.Reflection.Internal.MemoryBlock.PeekGuid(), System.Reflection.Internal.MemoryBlock.PeekUInt16(), System.Reflection.Internal.MemoryBlock.PeekUInt32(), System.Reflection.Internal.MemoryBlock.PeekUtf16(), System.Reflection.Internal.MemoryBlock.PeekUtf8(), System.Reflection.Internal.MemoryBlock.PeekUtf8NullTerminated(), System.Reflection.Internal.MemoryBlock.Utf8NullTerminatedFastCompare(), System.Reflection.Internal.MemoryBlock.Utf8NullTerminatedOffsetOfAsciiChar(), and System.Reflection.Internal.MemoryBlock.Utf8NullTerminatedStringStartsWithAsciiPrefix().