v0.3.1 - Fixed the infamous bug
TheWahlolly didn't know that arrays were stored in pointers when set into another variable, affecting the original array. I also made some changes into the code for ocelot logs so signals are much clearer to investigate (I hope).
This commit is contained in:
+11
-4
@@ -13,8 +13,12 @@ function _G.cormgr.loadCoroutine(path)
|
||||
end
|
||||
|
||||
function handleError(errormsg)
|
||||
-- nothing for now
|
||||
assert(false, errormsg)
|
||||
if errormsg~=nil then
|
||||
-- nothing for now
|
||||
error(tostring(errormsg))
|
||||
else
|
||||
error("An error has occured, but given as 'nil'.")
|
||||
end
|
||||
end
|
||||
|
||||
local function runCoroutines()
|
||||
@@ -41,15 +45,18 @@ repeat
|
||||
until not tmpdata
|
||||
for line in data:gmatch("([^\n]*)\n?") do
|
||||
if line ~= "" then
|
||||
--[[ if _G.print then
|
||||
print(line)
|
||||
end ]]
|
||||
_G.cormgr.loadCoroutine(line)
|
||||
runCoroutines()
|
||||
end
|
||||
end
|
||||
_G.cormgr.loadCoroutine("/halyde/core/shell.lua")
|
||||
-- _G.cormgr.loadCoroutine("/halyde/core/shell.lua")
|
||||
|
||||
while true do
|
||||
runCoroutines()
|
||||
if #_G.cormgr.corList == 0 then
|
||||
computer.shutdown()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user