From f8bbc319037762daf1df9ea4cb8285e26afd79b0 Mon Sep 17 00:00:00 2001 From: Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com> Date: Sun, 4 Aug 2024 04:13:09 +0000 Subject: [PATCH] fix(Solutions): Implement missing bounds check (#30239) --- .../Chemistry/EntitySystems/SolutionTransferSystem.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Content.Shared/Chemistry/EntitySystems/SolutionTransferSystem.cs b/Content.Shared/Chemistry/EntitySystems/SolutionTransferSystem.cs index e5d8cc5f59..b0f55a3272 100644 --- a/Content.Shared/Chemistry/EntitySystems/SolutionTransferSystem.cs +++ b/Content.Shared/Chemistry/EntitySystems/SolutionTransferSystem.cs @@ -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; -- 2.52.0