mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
use memcpy instead of strlcpy, some cores request 1 byte at a time from the cuesheet
This commit is contained in:
parent
08cd3a90f2
commit
0ad77800d9
@ -854,11 +854,20 @@ int64_t retro_vfs_file_read_impl(libretro_vfs_implementation_file *stream,
|
||||
|
||||
if (string_is_equal_noncase(ext, "cue"))
|
||||
{
|
||||
if (len < stream->cdrom_cue_len - stream->cdrom_cue_pos)
|
||||
{
|
||||
#ifdef CDROM_DEBUG
|
||||
printf("CDROM Read: Reading %lu bytes from cuesheet starting at %lu...\n", len, stream->cdrom_cue_pos);
|
||||
printf("CDROM Read: Reading %lu bytes from cuesheet starting at %lu...\n", len, stream->cdrom_cue_pos);
|
||||
#endif
|
||||
strlcpy(s, stream->cdrom_cue_buf + stream->cdrom_cue_pos, len);
|
||||
stream->cdrom_cue_pos += len;
|
||||
memcpy(s, stream->cdrom_cue_buf + stream->cdrom_cue_pos, len);
|
||||
stream->cdrom_cue_pos += len;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef CDROM_DEBUG
|
||||
printf("CDROM Read: Reading %lu bytes from cuesheet starting at %lu failed.\n", len, stream->cdrom_cue_pos);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (string_is_equal_noncase(ext, "bin"))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user