Skip to content

Commit b6933bf

Browse files
committed
fix: stop completed replays before reusing final input
Exit the active match as soon as replay EOF closes the input stream, before action can reuse the last loaded sample.
1 parent 90fb41b commit b6933bf

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/system.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3912,11 +3912,16 @@ func (s *System) runMatch() (reload bool) {
39123912
// Render frame
39133913
s.renderFrame()
39143914

3915-
// Update system. Break if update returns false (game ended)
3915+
// Update system. Break if update returns false (engine shutdown).
39163916
if !s.update() {
39173917
break
39183918
}
39193919

3920+
// Exit the replay match loop before EOF can reuse the last input sample.
3921+
if s.replayFile != nil && s.replayFile.file == nil {
3922+
break
3923+
}
3924+
39203925
// If end match selected from menu
39213926
if s.endMatch {
39223927
if !s.motif.fadeOut.isActive() {

0 commit comments

Comments
 (0)