From 89bb807cc27def5738b6f623b13f5f336005ec91 Mon Sep 17 00:00:00 2001 From: hkc Date: Sun, 15 Sep 2024 04:17:07 +0300 Subject: [PATCH] off-by-1 --- video.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video.lua b/video.lua index 442a9a9..ae4ab3d 100644 --- a/video.lua +++ b/video.lua @@ -253,7 +253,7 @@ table.insert(subthreads, function() term.setBackgroundColor(frame >= #frames and colors.red or colors.gray) term.clearLine() term.write(string.format("Playing frame: %d/%d", frame + 1, #frames)) - if frames[frame] then + if frames[frame + 1] then ccpi.draw(frames[frame + 1], 1, 1, monitor) end os.sleep(delay)