mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 12:03:07 +01:00
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:
@@ -109,6 +109,7 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
ShopItems.clear();
|
||||
for (auto i = 0; i < EnumValue(ShopItem::Count); i++)
|
||||
{
|
||||
if (items[i])
|
||||
|
||||
Reference in New Issue
Block a user