diff --git a/modules/base/header.lua b/modules/base/header.lua index a4d7247..47a5a87 100644 --- a/modules/base/header.lua +++ b/modules/base/header.lua @@ -32,13 +32,13 @@ do -- so local works eq[#eq+1]={computer.pullSignal(p)} -- add the latest event to the eq if #eq > 16 then table.remove(eq,1) -- remove the earliest if the eq is full - for pid,proc in ipairs(tT) do + for pid,proc in pairs(tT) do if proc.ep > 1 then proc.ep = proc.ep - 1 -- decrement pointers for tasks to keep them on the same ones end end end - for pid,proc in ipairs(tT) do + for pid,proc in pairs(tT) do if coroutine.status(proc.c) == "dead" then tT[pid] = nil else @@ -89,7 +89,7 @@ do -- so local works end function os.tasks() -- returns a table of tasks running on the system local t = {} - for k,v in ipairs(tT) do + for k,v in pairs(tT) do t[k] = v.n end return t