mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Merge pull request #9495 from Jamiras/psx_cheevos_fixes
improve handling of line endings when calculating CD hashes for retroachievements
This commit is contained in:
commit
2fca06c994
@ -1583,8 +1583,9 @@ found:
|
|||||||
char disc_path[PATH_MAX_LENGTH];
|
char disc_path[PATH_MAX_LENGTH];
|
||||||
char* tmp;
|
char* tmp;
|
||||||
|
|
||||||
intfstream_read(m3u_stream, buffer, sizeof(buffer));
|
num_read = intfstream_read(m3u_stream, buffer, sizeof(buffer));
|
||||||
intfstream_close(m3u_stream);
|
intfstream_close(m3u_stream);
|
||||||
|
buffer[num_read] = '\0';
|
||||||
|
|
||||||
tmp = buffer;
|
tmp = buffer;
|
||||||
while (*tmp && *tmp != '\n')
|
while (*tmp && *tmp != '\n')
|
||||||
@ -1640,7 +1641,7 @@ found:
|
|||||||
if (exe_name)
|
if (exe_name)
|
||||||
{
|
{
|
||||||
scan = exe_name;
|
scan = exe_name;
|
||||||
while (*scan != '\n' && *scan != ';' && *scan != ' ')
|
while (*scan != '\n' && *scan != '\r' && *scan != ';' && *scan != ' ')
|
||||||
++scan;
|
++scan;
|
||||||
*scan = '\0';
|
*scan = '\0';
|
||||||
|
|
||||||
|
@ -344,8 +344,6 @@ static intfstream_t* cdfs_open_cue_track(const char* path, unsigned int track_in
|
|||||||
|
|
||||||
while (*cue && *cue != '\n')
|
while (*cue && *cue != '\n')
|
||||||
++cue;
|
++cue;
|
||||||
if (cue == line)
|
|
||||||
continue;
|
|
||||||
if (*cue)
|
if (*cue)
|
||||||
*cue++ = '\0';
|
*cue++ = '\0';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user