summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2012-01-04 23:39:17 +0000
committer R. Belmont <rb6502@users.noreply.github.com>2012-01-04 23:39:17 +0000
commitca3c3db01a8138ba6db7fd812be7fa58c83d3338 (patch)
treea2c3638e238d1185456d95243ac6ec974be85e9e
parent3a0d474f7027a665afb660801dbd33cecd521dd6 (diff)
chdman: don't be case sensitive on the input type extension [R. Belmont]
-rw-r--r--src/lib/util/chdcd.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/util/chdcd.c b/src/lib/util/chdcd.c
index 2e70005ffb4..0d8c02077d7 100644
--- a/src/lib/util/chdcd.c
+++ b/src/lib/util/chdcd.c
@@ -851,18 +851,25 @@ chd_error chdcd_parse_toc(const char *tocfname, cdrom_toc *outtoc, chdcd_track_i
FILE *infile;
int i, trknum;
static char token[512];
+ char tocftemp[512];
- if (strstr(tocfname,".gdi"))
+ strcpy(tocftemp, tocfname);
+ for (i = 0; i < strlen(tocfname); i++)
+ {
+ tocftemp[i] = tolower(tocftemp[i]);
+ }
+
+ if (strstr(tocftemp,".gdi"))
{
return chdcd_parse_gdi(tocfname, outtoc, outinfo);
}
- if (strstr(tocfname,".cue"))
+ if (strstr(tocftemp,".cue"))
{
return chdcd_parse_cue(tocfname, outtoc, outinfo);
}
- if (strstr(tocfname,".nrg"))
+ if (strstr(tocftemp,".nrg"))
{
return chdcd_parse_nero(tocfname, outtoc, outinfo);
}