diff --git a/cheevos-new/cheevos.c b/cheevos-new/cheevos.c index 831fa9be5d..1d930b921d 100644 --- a/cheevos-new/cheevos.c +++ b/cheevos-new/cheevos.c @@ -1583,8 +1583,9 @@ found: char disc_path[PATH_MAX_LENGTH]; char* tmp; - intfstream_read(m3u_stream, buffer, sizeof(buffer)); + num_read = intfstream_read(m3u_stream, buffer, sizeof(buffer)); intfstream_close(m3u_stream); + buffer[num_read] = '\0'; tmp = buffer; while (*tmp && *tmp != '\n') @@ -1640,7 +1641,7 @@ found: if (exe_name) { scan = exe_name; - while (*scan != '\n' && *scan != ';' && *scan != ' ') + while (*scan != '\n' && *scan != '\r' && *scan != ';' && *scan != ' ') ++scan; *scan = '\0'; diff --git a/libretro-common/formats/cdfs/cdfs.c b/libretro-common/formats/cdfs/cdfs.c index 30c88b511d..36f4ae251e 100644 --- a/libretro-common/formats/cdfs/cdfs.c +++ b/libretro-common/formats/cdfs/cdfs.c @@ -344,8 +344,6 @@ static intfstream_t* cdfs_open_cue_track(const char* path, unsigned int track_in while (*cue && *cue != '\n') ++cue; - if (cue == line) - continue; if (*cue) *cue++ = '\0';