mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
Merge pull request #3286 from phyzical/bugfix/fix-max-warehouse-bulk-purchase
incorrect ternary with bulk purchase
This commit is contained in:
@@ -258,7 +258,7 @@ export function BulkPurchase(corp: ICorporation, warehouse: Warehouse, material:
|
||||
if (isNaN(amt) || amt < 0) {
|
||||
throw new Error(`Invalid input amount`);
|
||||
}
|
||||
if (amt * matSize > maxAmount) {
|
||||
if (amt * matSize <= maxAmount) {
|
||||
throw new Error(`You do not have enough warehouse size to fit this purchase`);
|
||||
}
|
||||
const cost = amt * material.bCost;
|
||||
|
||||
Reference in New Issue
Block a user