Buffer fixes

This commit is contained in:
Anuken
2026-02-16 12:50:34 -05:00
parent 4aa78c6a11
commit 13ad318ad9

View File

@@ -56,6 +56,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
//lz4 chokes on direct buffers, so copy the bytes over
int len = snet.readP2PPacket(from, readBuffer, 0);
readBuffer.limit(len);
readCopyBuffer.limit(readBuffer.capacity());
readCopyBuffer.position(0);
readCopyBuffer.put(readBuffer);
readCopyBuffer.limit(len);