henkelmax / simple-voice-chat

A working voice chat in Minecraft!
https://modrepo.de/minecraft/voicechat/wiki
457 stars 120 forks source link

[Proxy] Shrink Buffer due to overallocation in 1.20.6 #694

Closed nilathedragon closed 6 months ago

nilathedragon commented 6 months ago

The size calculation is magic to me with all these numbers so I was not able to fix this by correcting the size. Also further complicating things is that this size calculation worked for older versions.

So the easiest workaround I found was to simply shrink the buffer to the actual size to counter the over-allocation issue.

Feel free to rework as needed if you know how to fix the size calculation tho!

nilathedragon commented 6 months ago

Linux does not sign my commits yet. Dunno how to do that with 1Pass on Linux ^^"

henkelmax commented 6 months ago

Oh, I just noticed that I basically came up with the same fix as you :D sorry (de1bb241bd7906970e5a633bb0366a15a0974742)