3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-09-08 22:02:50 +02:00

Fix IOB in 1.13 recipe request

Fixes #2039
Dieser Commit ist enthalten in:
KennyTV 2020-08-27 09:37:51 +02:00
Ursprung 28219a3993
Commit 78bb5f171f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -841,9 +841,10 @@ public class Protocol1_13To1_12_2 extends Protocol<ClientboundPackets1_12_1, Cli
int type = wrapper.get(Type.VAR_INT, 0);
if (type == 0) {
Integer id = Ints.tryParse(wrapper.read(Type.STRING).substring(18));
String s = wrapper.read(Type.STRING);
Integer id;
// Custom recipes
if (id == null) {
if (s.length() < 19 || (id = Ints.tryParse(s.substring(18))) == null) {
wrapper.cancel();
return;
}