Add bounds checking for packet 51, type = 4

This commit is contained in:
Chris 2019-03-30 15:46:46 +10:30
parent ac02468038
commit 42fb0b10f4

View file

@ -3632,6 +3632,12 @@ namespace TShockAPI
return true;
}
if (type == 4 && (id < 0 || id > Main.npc.Length))
{
//Type == 4 -> 'BigMimicSpawnSmoke'. This access Main.npc without any bounds checking on Terraria's side.
return true;
}
return false;
}