mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-08 12:08:09 -06:00
Attempt to fix reported crash __cybersyn__/scripts/gui/stations.lua:110: bad argument #2 of 3 to 'btest' (number expected, got nil)
This commit is contained in:
@@ -100,14 +100,14 @@ function stations_tab.build(map_data, player_data)
|
||||
|
||||
if search_network_name then
|
||||
--setting default for GUI to NETWORK_EACH, which will match all
|
||||
if search_network_name == (NETWORK_EACH or NETWORK_ANYTHING) then
|
||||
if search_network_name == (NETWORK_EACH or NETWORK_ANYTHING) then --NETWORK_ANYTHING prevents crash due station having a nil issue, may need to be addressed in a different way
|
||||
goto has_match
|
||||
end
|
||||
if search_network_name ~= station.network_name then
|
||||
goto continue
|
||||
end
|
||||
::has_match::
|
||||
local train_flag = get_network_flag(station, search_network_name)
|
||||
local train_flag = get_network_flag(station, station.network_name) --we already validated search network name or a "match anything"
|
||||
if not bit32.btest(search_network_mask, train_flag) then
|
||||
goto continue
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user