From 417e5ae7d5d51d1abaff452d65977b0747eeacd4 Mon Sep 17 00:00:00 2001 From: Ririan <52671181+Ririan@users.noreply.github.com> Date: Fri, 7 May 2021 07:53:53 -0500 Subject: [PATCH] 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. --- src/openrct2-ui/windows/NewCampaign.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openrct2-ui/windows/NewCampaign.cpp b/src/openrct2-ui/windows/NewCampaign.cpp index cd8e704c89..75d177bb02 100644 --- a/src/openrct2-ui/windows/NewCampaign.cpp +++ b/src/openrct2-ui/windows/NewCampaign.cpp @@ -109,6 +109,7 @@ private: } } + ShopItems.clear(); for (auto i = 0; i < EnumValue(ShopItem::Count); i++) { if (items[i])