From a2487dde6f22aba26c8801cf3cf0f429d20c48db Mon Sep 17 00:00:00 2001 From: Bentroen <29354120+Bentroen@users.noreply.github.com> Date: Sat, 30 Nov 2024 21:54:13 -0300 Subject: [PATCH] fix: song loop start tick being written to file as byte instead of short Fixes #11 --- src/nbs/export/toArrayBuffer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nbs/export/toArrayBuffer.ts b/src/nbs/export/toArrayBuffer.ts index 4283458..7786636 100644 --- a/src/nbs/export/toArrayBuffer.ts +++ b/src/nbs/export/toArrayBuffer.ts @@ -86,7 +86,7 @@ function write(song: Song): BufferWriter { if (song.version >= 4) { writer.writeByte(+song.loop.enabled); // Write loop status writer.writeByte(song.loop.totalLoops); // Write maximum loop count - writer.writeByte(song.loop.startTick); // Write loop start tick + writer.writeShort(song.loop.startTick); // Write loop start tick } writer.writeByte(0); // Write end of header