From 3fae01b08fa86b6f1fc8df9cf2617e2d679a1d7e Mon Sep 17 00:00:00 2001 From: TuxSH Date: Wed, 9 May 2018 17:10:35 +0200 Subject: [PATCH] Rewrite condition in fsdev_seek --- fusee/fusee-secondary/src/fs_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fusee/fusee-secondary/src/fs_dev.c b/fusee/fusee-secondary/src/fs_dev.c index 79f8a69aa..dc566f48c 100644 --- a/fusee/fusee-secondary/src/fs_dev.c +++ b/fusee/fusee-secondary/src/fs_dev.c @@ -385,7 +385,7 @@ static off_t fsdev_seek(struct _reent *r, void *fd, off_t pos, int whence) { return -1; } - if(pos < 0 && off < -pos) { + if(pos < 0 && pos + off < 0) { /* don't allow seek to before the beginning of the file */ r->_errno = EINVAL; return -1;