diff options
Diffstat (limited to 'src/SMAPI')
-rw-r--r-- | src/SMAPI/Metadata/CoreAssetPropagator.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs index 97093636..a684b473 100644 --- a/src/SMAPI/Metadata/CoreAssetPropagator.cs +++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs @@ -239,11 +239,13 @@ namespace StardewModdingAPI.Metadata int rewardsCount = pair.Value.Split('/')[2].Split(' ').Length; // add bundles - if (bundles.TryGetValue(bundleKey, out bool[] values)) + if (!bundles.TryGetValue(bundleKey, out bool[] values) || values.Length < rewardsCount) + { + values ??= new bool[0]; + bundles.Remove(bundleKey); - else - values = new bool[0]; - bundles[bundleKey] = values.Concat(Enumerable.Repeat(false, rewardsCount - values.Length)).ToArray(); + bundles[bundleKey] = values.Concat(Enumerable.Repeat(false, rewardsCount - values.Length)).ToArray(); + } // add bundle rewards if (!rewards.ContainsKey(bundleKey)) |