Skip to content

Commit

Permalink
bugfix: Fixed 0-length hold parsing when note is not break and not in…
Browse files Browse the repository at this point in the history
…validated
  • Loading branch information
xhayper committed Nov 12, 2023
1 parent 0841f56 commit 070f994
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/internal/syntacticAnalysis/states/noteReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class NoteReader {
}

case TokenType.Duration: {
NoteReader.readDuration(parent.timingChanges[parent.timingChanges.length-1], token, currentNote);
NoteReader.readDuration(parent.timingChanges[parent.timingChanges.length - 1], token, currentNote);
break;
}

Expand Down Expand Up @@ -101,9 +101,8 @@ export class NoteReader {
note.styles |= NoteStyles.Mine;
return;
case "h":
if (note.type === NoteType.Break || note.type === NoteType.ForceInvalidate) break;
if (note.type !== NoteType.Break && note.type !== NoteType.ForceInvalidate) note.type = NoteType.Hold;

note.type = NoteType.Hold;
note.length ??= 0;
return;
case "?":
Expand Down

0 comments on commit 070f994

Please sign in to comment.