s integer overflow, unsafe cast
This commit is contained in:
1 parent
a24f9f5a5e
commit
ed13020cf3
7 files changed
+28
-23
No files matched your search
@@ -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