fix: wrong check again
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user