GME Plugin: fix track numbering
GME starts all track indexes at zero, but subtune prefixes start at one. This fixes an off-by-one error during track enumeration.
This commit is contained in:
parent
9256e748c8
commit
bd50a0d2ef
@ -319,13 +319,13 @@ gme_container_scan(Path path_fs)
|
||||
TagBuilder tag_builder;
|
||||
|
||||
auto tail = list.before_begin();
|
||||
for (unsigned i = 1; i <= num_songs; ++i) {
|
||||
for (unsigned i = 0; i < num_songs; ++i) {
|
||||
ScanMusicEmu(emu, i,
|
||||
add_tag_handler, &tag_builder);
|
||||
|
||||
char track_name[64];
|
||||
snprintf(track_name, sizeof(track_name),
|
||||
SUBTUNE_PREFIX "%03u.%s", i, subtune_suffix);
|
||||
SUBTUNE_PREFIX "%03u.%s", i+1, subtune_suffix);
|
||||
tail = list.emplace_after(tail, track_name,
|
||||
tag_builder.Commit());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user