(retro_file) Fix fseek()

This commit is contained in:
Higor Eurípedes 2015-11-15 09:58:38 -03:00
parent 2b143af4dc
commit c2eac57529

View File

@ -310,13 +310,13 @@ ssize_t retro_fseek(RFILE *stream, ssize_t offset, int whence)
break;
}
return 0;
return stream->mappos;
}
else
#endif
{
ret = lseek(stream->fd, offset, whence);
return ret == -1 ? -1 : 0;
return ret < 0 ? -1 : ret;
}
#endif
}