fix: return when logs are empty

This commit is contained in:
2025-05-08 13:49:59 -03:00
parent 45c499b6de
commit 973abbbfed
+2
View File
@@ -349,6 +349,8 @@ function drawLogs(x0, y0, x1, y1)
local w = x1 - x0 local w = x1 - x0
local h = y1 - y0 local h = y1 - y0
if #log.buffer == 0 then return end
local drawnLines = 0 local drawnLines = 0
for i = #log.buffer - logOffset, 1, -1 do for i = #log.buffer - logOffset, 1, -1 do
if drawnLines > h then break end if drawnLines > h then break end