Fixed #5474
This commit is contained in:
@@ -391,7 +391,15 @@ public class ArcNetProvider implements NetProvider{
|
||||
//no compression, copy over buffer
|
||||
if(compression == 0){
|
||||
buffer.position(0).limit(length);
|
||||
buffer.put(byteBuffer.array(), byteBuffer.position(), length);
|
||||
if(byteBuffer.hasArray()){
|
||||
buffer.put(byteBuffer.array(), byteBuffer.position(), length);
|
||||
}else{
|
||||
byte[] readcopy = new byte[length];
|
||||
int pos = byteBuffer.position();
|
||||
byteBuffer.get(readcopy);
|
||||
byteBuffer.position(pos);
|
||||
buffer.put(readcopy);
|
||||
}
|
||||
buffer.position(0);
|
||||
packet.read(reads.get(), length);
|
||||
//move read packets forward
|
||||
|
||||
Reference in New Issue
Block a user