mirror of https://github.com/mgba-emu/mgba.git
Fix seeking to end of file
This commit is contained in:
parent
d2272ba9ba
commit
793a89d091
|
@ -110,7 +110,7 @@ off_t _vfzSeek(struct VFile* vf, off_t offset, int whence) {
|
|||
return position;
|
||||
}
|
||||
|
||||
if (position < vfz->fileSize) {
|
||||
if (position <= vfz->fileSize) {
|
||||
ssize_t read = vf->read(vf, 0, position - vfz->offset);
|
||||
if (read < 0) {
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue