git @ Cat's Eye Technologies Etcha / master
Fix bugs in Debugging.render() and Playfield:load(). Chris Pressey 7 months ago
2 changed file(s) with 5 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
2222 do_debug(what, function() print("--> (" .. s .. ")") end)
2323 end
2424
25 local render = function(v, count)
25 local render
26 render = function(v, count)
2627 if not count then count = 0 end
2728 if count > 100 then return "!!OVERFLOW!!" end
2829 if type(v) == "table" then
2930 local s = "{"
3031 local key, value
32 -- FIXME it would be great if this could be sorted by key.
33 -- alas, in Lua that will take a little work.
3134 for key, value in pairs(v) do
3235 s = s .. render(key, count + 1) .. ": " .. render(value, count + 1) .. ","
3336 end
8787 local y = sy or 0
8888 local len = string.len(program_text)
8989 local c
90 while i < len do
90 while i <= len do
9191 c = program_text:sub(i, i)
9292 if c == "\n" then
9393 x = 0