Skip to content

Commit

Permalink
Fix detection when sample has maximum length
Browse files Browse the repository at this point in the history
Fixes #25
  • Loading branch information
stefandrissen committed Oct 27, 2023
1 parent c9d1828 commit fbed642
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/loader/mod.s
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,16 @@ mod.determine.type:

ld d,(ix+mod.sample.repeat.len.words+0)
ld e,(ix+mod.sample.repeat.len.words+1)

ld a,d
or a
jr nz,@repeat.len.gt.1
ld a,e
cp 2
jr c,@ok ; loop length < 2 is not a real loop

@repeat.len.gt.1:

add hl,de

inc bc
Expand Down

0 comments on commit fbed642

Please sign in to comment.