Skip to content

Commit

Permalink
Added bugfix for invalid network ID in histories.
Browse files Browse the repository at this point in the history
  • Loading branch information
eduran84 committed Mar 13, 2019
1 parent cb61c08 commit 6f38b88
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Date: 2019-03-13

Bugfixes:
- Fixed #15: crash after UI being deleted by other mods.
- Fixed error caused by histories with invalid network ID.

---------------------------------------------------------------------------------------------------
Version: 0.9.2
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"homepage": "https://forums.factorio.com/viewtopic.php?f=190&t=64842",
"description": "A GUI for LTN. Displays information about LTN stops, available items and trains controlled by LTN.",
"factorio_version": "0.17",
"dependencies": ["base >= 0.17.4", "LogisticTrainNetwork >= 1.10.2"]
"dependencies": ["base >= 0.17.11", "LogisticTrainNetwork >= 1.10.2"]
}
2 changes: 1 addition & 1 deletion ltnt/data_processing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ local get_main_loco = require("ltnt.util").get_main_loco

local function store_history(history)
history.runtime = game.tick - history.started
history.networkID = history.networkID > 2147483648 and history.networkID - 4294967296 or history.networkID
history.networkID = history.networkID and history.networkID > 2147483648 and history.networkID - 4294967296 or history.networkID
data.delivery_hist[data.newest_history_index] = history
data.newest_history_index = (data.newest_history_index % HISTORY_LIMIT) + 1
end
Expand Down

0 comments on commit 6f38b88

Please sign in to comment.