fix: wrong check again

This commit is contained in:
2025-05-06 20:12:43 -03:00
parent 66373685a0
commit 3211f473a6
+4 -1
View File
@@ -238,8 +238,9 @@ function updateScreen()
-- logs -- logs
local function drawLogs(startY, endY) local function drawLogs(startY, endY)
local drawnLines = 0
for i = #log.buffer, 1, -1 do 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 entry = log.buffer[i]
local format = logTypes[entry.type] local format = logTypes[entry.type]
@@ -262,6 +263,8 @@ function updateScreen()
term.setTextColour(prevColourFg) term.setTextColour(prevColourFg)
term.write((" %s\n"):format(entry.message)) term.write((" %s\n"):format(entry.message))
end end
drawnLines = drawnLines + 1
end end
end end