diff --git a/lua/CC Tweaked/tutel/tutel-host.lua b/lua/CC Tweaked/tutel/tutel-host.lua index bb36c5d..ebfe6e2 100644 --- a/lua/CC Tweaked/tutel/tutel-host.lua +++ b/lua/CC Tweaked/tutel/tutel-host.lua @@ -238,8 +238,9 @@ function updateScreen() -- logs local function drawLogs(startY, endY) + local drawnLines = 0 for i = #log.buffer, 1, -1 do - if i > endY - startY then break end + if drawnLines > endY - startY then break end local entry = log.buffer[i] local format = logTypes[entry.type] @@ -262,6 +263,8 @@ function updateScreen() term.setTextColour(prevColourFg) term.write((" %s\n"):format(entry.message)) end + + drawnLines = drawnLines + 1 end end