Use Array.Copy() instead of Linq
This commit is contained in:
@ -50,7 +50,8 @@ namespace RageCoop.Core
|
|||||||
|
|
||||||
public byte[] ReadByteArray(int length)
|
public byte[] ReadByteArray(int length)
|
||||||
{
|
{
|
||||||
byte[] value = ResultArray.Skip(CurrentIndex).Take(length).ToArray();
|
byte[] value = new byte[length];
|
||||||
|
Array.Copy(ResultArray, CurrentIndex,value,0,length);
|
||||||
CurrentIndex += length;
|
CurrentIndex += length;
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user