From 50e4527296975a023abb478de62b425936f423c0 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 7 Dec 2022 19:40:30 +0100 Subject: [PATCH] fixed bug with advancing tape counter if no input events have been recorded --- src/tape.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tape.c b/src/tape.c index fb00fcd5..0a7dffc3 100644 --- a/src/tape.c +++ b/src/tape.c @@ -779,7 +779,9 @@ static void TapeAppendRecording(void) void TapeHaltRecording(void) { - tape.counter++; + // only advance tape counter if any input events have been recorded + if (tape.pos[tape.counter].delay > 0) + tape.counter++; // initialize delay for next tape entry (to be able to continue recording) if (tape.counter < MAX_TAPE_LEN) -- 2.34.1