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:
Ponali
2025-04-08 19:55:23 +02:00
parent 198b56e64a
commit 6f1508d1bf
6 changed files with 30 additions and 22 deletions
+11 -4
View File
@@ -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