diff options
author | notaz | 2014-12-06 19:14:34 +0200 |
---|---|---|
committer | Adrien Plazas | 2014-12-07 09:35:02 +0100 |
commit | d515eaa2e43d87a2fe7d54b7f7b30174631f2d18 (patch) | |
tree | c6519ee19138575d64d278713e598d4bf0096bee /libpcsxcore | |
parent | 4726dba005562cbaf69cc8e10ef7102184c4a089 (diff) | |
download | pcsx_rearmed-d515eaa2e43d87a2fe7d54b7f7b30174631f2d18.tar.gz pcsx_rearmed-d515eaa2e43d87a2fe7d54b7f7b30174631f2d18.tar.bz2 pcsx_rearmed-d515eaa2e43d87a2fe7d54b7f7b30174631f2d18.zip |
misc: don't succeed on trash input
Diffstat (limited to 'libpcsxcore')
-rw-r--r-- | libpcsxcore/misc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c index 874624d..905f142 100644 --- a/libpcsxcore/misc.c +++ b/libpcsxcore/misc.c @@ -109,6 +109,7 @@ void mmssdd( char *b, char *p ) int GetCdromFile(u8 *mdir, u8 *time, char *filename) { struct iso_directory_record *dir; + int retval = -1; u8 ddir[4096]; u8 *buf; int i; @@ -138,11 +139,12 @@ int GetCdromFile(u8 *mdir, u8 *time, char *filename) { } else { if (!strnicmp((char *)&dir->name[0], filename, strlen(filename))) { mmssdd(dir->extent, (char *)time); + retval = 0; break; } } } - return 0; + return retval; } static const unsigned int gpu_ctl_def[] = { |