From 091811ad3fbfe0a8cbd5d9ba5236bd903415fda5 Mon Sep 17 00:00:00 2001 From: neru Date: Thu, 8 May 2025 01:09:08 -0300 Subject: [PATCH] fix: wrong idxstuff --- lua/CC Tweaked/tutel/tutel-host.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/CC Tweaked/tutel/tutel-host.lua b/lua/CC Tweaked/tutel/tutel-host.lua index 741e1c2..8b33e71 100644 --- a/lua/CC Tweaked/tutel/tutel-host.lua +++ b/lua/CC Tweaked/tutel/tutel-host.lua @@ -265,7 +265,9 @@ function drawLogs(x0, y0, x1, y1) messageFG = prevColourFg end - for lineIdx, line in ipairs(wrappedMessage) do + for lineIdx=#wrappedMessage, 1, -1 do + local line = wrappedMessage[i] + if drawnLines > h then break end local currentY = y1 - drawnLines @@ -289,7 +291,6 @@ function drawLogs(x0, y0, x1, y1) term.write(line) end - drawnLines = drawnLines + 1 end end