From ec27880302930e65a205b43e357d0e45bdcbe015 Mon Sep 17 00:00:00 2001 From: semyon422 Date: Tue, 21 May 2024 16:58:16 +0500 Subject: [PATCH] Fix crash --- sphere/models/RhythmModel/LogicEngine/NoteHandler.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sphere/models/RhythmModel/LogicEngine/NoteHandler.lua b/sphere/models/RhythmModel/LogicEngine/NoteHandler.lua index 5bf9496db..a34960bcb 100644 --- a/sphere/models/RhythmModel/LogicEngine/NoteHandler.lua +++ b/sphere/models/RhythmModel/LogicEngine/NoteHandler.lua @@ -42,7 +42,7 @@ function NoteHandler:load() end self.startNoteIndex = 1 - self.endNoteIndex = 1 + self.endNoteIndex = 0 end function NoteHandler:updateRange() @@ -59,7 +59,7 @@ function NoteHandler:updateRange() end local eventTime = self.logicEngine:getEventTime() - for i = self.endNoteIndex, #notes do + for i = self.endNoteIndex + 1, #notes do local note = notes[i].note if not note.ended and note.isPlayable and note:getNoteTime() >= eventTime then self.endNoteIndex = i