From 0306397f5302574bb46b98840e09326081138bee Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Wed, 8 Dec 2021 18:25:49 -0500 Subject: [PATCH] fix buying negative memory --- src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx b/src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx index 0707e4381..ce1d81317 100644 --- a/src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx +++ b/src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx @@ -30,6 +30,7 @@ export function CovenantSleeveMemoryUpgrade(props: IProps): React.ReactElement { let n: number = parseInt(e.target.value); if (isNaN(n)) n = 1; + if (n < 1) n = 1; const maxMemory = 100 - props.sleeve.memory; if (n > maxMemory) n = maxMemory;