mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-23 04:41:12 +00:00
Rewrite condition in fsdev_seek
This commit is contained in:
parent
bf94bf48d2
commit
3fae01b08f
1 changed files with 1 additions and 1 deletions
|
@ -385,7 +385,7 @@ static off_t fsdev_seek(struct _reent *r, void *fd, off_t pos, int whence) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pos < 0 && off < -pos) {
|
if(pos < 0 && pos + off < 0) {
|
||||||
/* don't allow seek to before the beginning of the file */
|
/* don't allow seek to before the beginning of the file */
|
||||||
r->_errno = EINVAL;
|
r->_errno = EINVAL;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue