mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix Duplicate Entries in Free Food Ad Campaign
When opening and closing the dropdown box multiple times while attempting to create an ad campaign for free food vouchers, the game would duplicate the available food items in the list each time. I discovered that it was because the vector wasn't being cleared each time the list was populated it, so an easy fix is to clear it before continuing.
This commit is contained in:
parent
ad1bfe0f49
commit
417e5ae7d5
|
@ -109,6 +109,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
ShopItems.clear();
|
||||
for (auto i = 0; i < EnumValue(ShopItem::Count); i++)
|
||||
{
|
||||
if (items[i])
|
||||
|
|
Loading…
Reference in New Issue