From c7d05cae5888335fc58b5f023665668def57b54a Mon Sep 17 00:00:00 2001 From: omuretsu <84951833+Snarling@users.noreply.github.com> Date: Mon, 12 Jun 2023 16:04:21 -0400 Subject: [PATCH] Add parens to replacement for IINV and EINV --- src/Corporation/Division.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Corporation/Division.ts b/src/Corporation/Division.ts index 889f0df4a..af934f279 100644 --- a/src/Corporation/Division.ts +++ b/src/Corporation/Division.ts @@ -628,10 +628,10 @@ export class Division { /MAX/g, (mat.stored / (corpConstants.secondsPerMarketCycle * marketCycles)).toString(), ); - amtStr = amtStr.replace(/EPROD/g, "(" + mat.productionAmount + ")"); - amtStr = amtStr.replace(/IPROD/g, "(" + tempMaterial.productionAmount + ")"); - amtStr = amtStr.replace(/EINV/g, mat.stored.toString()); - amtStr = amtStr.replace(/IINV/g, tempMaterial.stored.toString()); + amtStr = amtStr.replace(/EPROD/g, `(${mat.productionAmount})`); + amtStr = amtStr.replace(/IPROD/g, `(${tempMaterial.productionAmount})`); + amtStr = amtStr.replace(/EINV/g, `(${mat.stored})`); + amtStr = amtStr.replace(/IINV/g, `(${tempMaterial.stored})`); let amt = 0; try { amt = eval(amtStr);