diff options
Diffstat (limited to 'advtrains/occupation.lua')
-rw-r--r-- | advtrains/occupation.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/advtrains/occupation.lua b/advtrains/occupation.lua index 20a986e..66ad36c 100644 --- a/advtrains/occupation.lua +++ b/advtrains/occupation.lua @@ -103,7 +103,9 @@ function o.clear_all_items(train_id, pos) local t = occget(pos) if not t then return end local i = 1 + local _cnt = 0 while t[i] do + _cnt = _cnt + 1; if _cnt > 10000 then error("Loop trap in advtrains.occ,clear_all_items was triggered!") end if t[i]==train_id then table.remove(t, i) table.remove(t, i) |