]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix(Solutions): Implement missing bounds check (#30239)
authorBrandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
Sun, 4 Aug 2024 04:13:09 +0000 (04:13 +0000)
committerGitHub <noreply@github.com>
Sun, 4 Aug 2024 04:13:09 +0000 (00:13 -0400)
Content.Shared/Chemistry/EntitySystems/SolutionTransferSystem.cs

index e5d8cc5f59766decd26b459c0f80638930dc0656..b0f55a32720cf5b01a5ed1c762ebe5f4aa25a779 100644 (file)
@@ -76,6 +76,9 @@ public sealed class SolutionTransferSystem : EntitySystem
         var user = args.User;
         foreach (var amount in DefaultTransferAmounts)
         {
+          if (amount < comp.MinimumTransferAmount || amount > comp.MaximumTransferAmount)
+                continue;
+
             AlternativeVerb verb = new();
             verb.Text = Loc.GetString("comp-solution-transfer-verb-amount", ("amount", amount));
             verb.Category = VerbCategory.SetTransferAmount;