decoder/{gme,sidplay}: fix off-by-one bug in container_scan()

Broken by commit 0abee77e62
This commit is contained in:
Max Kellermann 2016-11-22 12:20:18 +01:00
parent c5133f6088
commit a303639c9e
2 changed files with 2 additions and 2 deletions

View File

@ -125,7 +125,7 @@ gme_container_scan(Path path_fs)
const char *subtune_suffix = uri_get_suffix(path_fs.c_str());
auto tail = list.before_begin();
for (unsigned i = 1; i < num_songs; ++i) {
for (unsigned i = 1; i <= num_songs; ++i) {
char track_name[64];
snprintf(track_name, sizeof(track_name),
SUBTUNE_PREFIX "%03u.%s", i, subtune_suffix);

View File

@ -499,7 +499,7 @@ sidplay_container_scan(Path path_fs)
return list;
auto tail = list.before_begin();
for (unsigned i = 1; i < n_tracks; ++i) {
for (unsigned i = 1; i <= n_tracks; ++i) {
char track_name[32];
/* Construct container/tune path names, eg.
Delta.sid/tune_001.sid */