Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
inventory: C++ casting for mallocing items
Browse files Browse the repository at this point in the history
  • Loading branch information
IAmMoltony committed Jan 7, 2024
1 parent 6766b4c commit c367121
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/inventory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Inventory Inventory::itemArrayToInventory(const InventoryItem *array, u8 numSlot

Inventory::Inventory(u8 numSlots) : numSlots(numSlots), items(nullptr), sortMode(true)
{
items = (InventoryItem *)malloc(sizeof(InventoryItem) * numSlots);
items = reinterpret_cast<InventoryItem*>(malloc(sizeof(InventoryItem) * numSlots));
clear();
}

Expand Down

0 comments on commit c367121

Please sign in to comment.