diff options
author | John Regan <john@jrjrtech.com> | 2017-09-26 08:42:53 -0500 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-09-27 11:18:03 +0200 |
commit | ea80587ddb1905851623200b4cf5ef260f8c9631 (patch) | |
tree | 25b2a21ba0f941be8b240eb48dc69a8c76175aea /src/decoder | |
parent | 828f5f83844b072f43417066c36d7d257d63db1a (diff) |
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.
Diffstat (limited to 'src/decoder')
-rw-r--r-- | src/decoder/plugins/GmeDecoderPlugin.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder/plugins/GmeDecoderPlugin.cxx b/src/decoder/plugins/GmeDecoderPlugin.cxx index 403e62346..1b9d06163 100644 --- a/src/decoder/plugins/GmeDecoderPlugin.cxx +++ b/src/decoder/plugins/GmeDecoderPlugin.cxx @@ -293,13 +293,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()); } |