diff --git a/libpsx/src/libc.c b/libpsx/src/libc.c index 2cf4064..607d8b0 100644 --- a/libpsx/src/libc.c +++ b/libpsx/src/libc.c @@ -286,6 +286,7 @@ static size_t cdromread(void *restrict ptr, size_t sz, const size_t firstsz = SECTOR_SZ - first_sector_sz; memcpy(ptr, &f->buf[first_sector_sz], firstsz); + ptr = (char *)ptr + firstsz; f->pos += firstsz; lseek(f->fildes, f->pos, SEEK_SET); f->cache_available = 0;