From: kub Date: Thu, 29 Jun 2023 19:54:07 +0000 (+0000) Subject: mcd, fix no chd music in some cases X-Git-Tag: v2.00~198 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=914525c3d52e264e6e7a05130571ae32989c62bd;p=picodrive.git mcd, fix no chd music in some cases --- diff --git a/pico/cd/cd_parse.c b/pico/cd/cd_parse.c index 53c15d20..0a802ed3 100644 --- a/pico/cd/cd_parse.c +++ b/pico/cd/cd_parse.c @@ -172,7 +172,8 @@ cd_data_t *chd_parse(const char *fname) } memset(&data->tracks[count], 0, sizeof(data->tracks[0])); - data->tracks[count].fname = strdup(fname); + if (count == 1) + data->tracks[count].fname = strdup(fname); if (!strcmp(type, "MODE1_RAW") || !strcmp(type, "MODE2_RAW")) { data->tracks[count].type = CT_BIN; } else if (!strcmp(type, "MODE1") || !strcmp(type, "MODE2_FORM1")) {