mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
fix buying negative memory
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user