diff --git a/modules/base/footer.lua b/modules/base/footer.lua index 3da2acd..1cacb73 100644 --- a/modules/base/footer.lua +++ b/modules/base/footer.lua @@ -5,7 +5,7 @@ while #tT > 0 do if C.status(v[2])~="dead" then C.resume(v[2],table.unpack(ev)) else - T.remove(tT,k) + tT[k] = nil end end end diff --git a/modules/base/header.lua b/modules/base/header.lua index be6546d..a9ee54e 100644 --- a/modules/base/header.lua +++ b/modules/base/header.lua @@ -1,4 +1,4 @@ -tT,p,cT,C,T={},1,1,coroutine,table +tT,p,cT,pC,C,T={},1,1,1,coroutine,table function E() if tT[cT] ~= nil then return tT[cT][3] end end @@ -9,5 +9,6 @@ function h(...) computer.pushSignal(...) end function s(n,f,e) - T.insert(tT,{n,C.create(f),(e or E() or {})}) + tT[pC]={n,C.create(f),(e or E() or {})} + pC=pC+1 end