fix(core): Converts Gump Packets (v1) (#379)

- [X] Converts gump packets
This commit is contained in:
Kamron Batman 2021-01-05 01:17:34 -08:00 • committed by GitHub
parent 126b80f74b
commit a278623f38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 790 additions and 763 deletions

View file

@ -362,9 +362,11 @@ namespace System.Buffers
if (Position < _first.Length)
{
var sz = Math.Min(buffer.Length, _first.Length - Position);
buffer.CopyTo(_first.Slice(Position));
buffer.Slice(sz).CopyTo(_second);
Position += buffer.Length;
buffer.Slice(0, sz).CopyTo(_first.Slice(Position));
if (sz < buffer.Length)
{
buffer.Slice(sz).CopyTo(_second);
}
}
else if (Position < Length)
{
@ -374,6 +376,8 @@ namespace System.Buffers
{
throw new OutOfMemoryException();
}
Position += buffer.Length;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]