mirror of
https://github.com/GTNewHorizons/EnderCore.git
synced 2026-11-21 12:32:15 +00:00
Fix potential crash in ItemUtil stack parsing
This commit is contained in:
1 parent
7e28209e71
commit
9c2a343f6c
1 file changed
+2
-2
@@ -137,7 +137,7 @@ public class ItemUtil {
|
||||
|
||||
NBTTagCompound tag = null;
|
||||
|
||||
if (numIdx != -1) {
|
||||
if (numIdx > -1) {
|
||||
String num = string.substring(numIdx + 1, nbtIdx == -1 ? string.length() : nbtIdx);
|
||||
|
||||
try {
|
||||
@@ -150,7 +150,7 @@ public class ItemUtil {
|
||||
nbtIdx -= num.length() + 1;
|
||||
}
|
||||
|
||||
if (nbtIdx != -1) {
|
||||
if (nbtIdx > -1) {
|
||||
String nbt = string.substring(nbtIdx + 1);
|
||||
try {
|
||||
tag = (NBTTagCompound) JsonToNBT.func_150315_a(nbt);
|
||||
|
||||
Reference in new issue
Block a user