mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-11 00:54:13 +00:00
s integer overflow, unsafe cast
This commit is contained in:
@@ -135,11 +135,11 @@ MerchantRecipeList *MerchantRecipeList::createFromStream(DataInputStream *stream
|
||||
|
||||
void MerchantRecipeList::load(CompoundTag *tag)
|
||||
{
|
||||
ListTag<CompoundTag> *list = (ListTag<CompoundTag> *) tag->getList(L"Recipes");
|
||||
ListTag<Tag> *list = tag->getList(L"Recipes");
|
||||
|
||||
for (int i = 0; i < list->size(); i++)
|
||||
{
|
||||
CompoundTag *recipeTag = list->get(i);
|
||||
CompoundTag *recipeTag = (CompoundTag*) list->get(i);
|
||||
m_recipes.push_back(new MerchantRecipe(recipeTag));
|
||||
}
|
||||
}
|
||||
@@ -192,4 +192,4 @@ size_t MerchantRecipeList::size()
|
||||
bool MerchantRecipeList::empty()
|
||||
{
|
||||
return m_recipes.empty();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user