(PS1) serial lookup: improve error detection.

This commit is contained in:
aliaspider 2015-09-26 01:27:17 +01:00
parent bdcc7c81ce
commit eb10e8b977

View File

@ -178,6 +178,8 @@ static int detect_ps1_game_sub(const char *track_path, char *game_id, int sub_ch
tmp += *tmp;
}
if(tmp >= (buffer + 2048 * 2))
return 0;
cd_sector = tmp[2] | (tmp[3] << 8) | (tmp[4] << 16);
retro_fseek(fp, 13 + skip + cd_sector * frame_size, SEEK_SET);