mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 16:13:12 +09:00
Fixed inventoryCombinator attempting to output 2360791303, resolves #62
Because it was above 2^31
This commit is contained in:
1 parent
bd1304365c
commit
566d61755e
1 file changed
+3
@@ -712,6 +712,9 @@ 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){
|
||||||
|
inventoryFrame[inventory[i].name] = 2 ** 31;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
inventoryFrame["signal-unixtime"] = Math.floor(Date.now()/1000);
|
inventoryFrame["signal-unixtime"] = Math.floor(Date.now()/1000);
|
||||||
// console.log("RCONing inventory! " + JSON.stringify(inventoryFrame));
|
// console.log("RCONing inventory! " + JSON.stringify(inventoryFrame));
|
||||||
|
|||||||
Reference in new issue
Block a user