mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-24 00:23:12 +09:00
#61 without ES6 features to support node 6.10
This commit is contained in:
1 parent
132c7999f3
commit
9496fa70e0
1 file changed
+2
-2
@@ -736,8 +736,8 @@ function instanceManagement() {
|
|||||||
var inventoryFrame = {};
|
var inventoryFrame = {};
|
||||||
for (let i = 0; i < inventory.length; i++) {
|
for (let i = 0; i < inventory.length; i++) {
|
||||||
inventoryFrame[inventory[i].name] = Number(inventory[i].count);
|
inventoryFrame[inventory[i].name] = Number(inventory[i].count);
|
||||||
if(inventoryFrame[inventory[i].name] >= 2 ** 31){
|
if(inventoryFrame[inventory[i].name] >= Math.pow(2, 31)){
|
||||||
inventoryFrame[inventory[i].name] = 2 ** 30; // set it waaay lower, -1 would probably suffice
|
inventoryFrame[inventory[i].name] = Math.pow(2, 30); // set it waaay lower, 31 -1 would probably suffice
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
inventoryFrame["signal-unixtime"] = Math.floor(Date.now()/1000);
|
inventoryFrame["signal-unixtime"] = Math.floor(Date.now()/1000);
|
||||||
|
|||||||
Reference in new issue
Block a user