Fix SCommandListPacket underflowing buffer when encountering a missing argument type

This commit is contained in:
tterrag 2019-09-08 01:33:21 -04:00
parent b6cd19b4ae
commit 5efa373d7f
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
--- a/net/minecraft/network/play/server/SCommandListPacket.java
+++ b/net/minecraft/network/play/server/SCommandListPacket.java
@@ -110,6 +110,9 @@
String s = p_197695_1_.func_150789_c(32767);
ArgumentType<?> argumenttype = ArgumentTypes.func_197486_a(p_197695_1_);
if (argumenttype == null) {
+ if ((p_197695_2_ & 16) != 0) { // FORGE: Flush unused suggestion data
+ p_197695_1_.func_192575_l();
+ }
return null;
} else {
RequiredArgumentBuilder<ISuggestionProvider, ?> requiredargumentbuilder = RequiredArgumentBuilder.argument(s, argumenttype);