* fhandler_floppy.cc (fhandler_dev_floppy::lseek): Fix test for

valid file position at EOM.
This commit is contained in:
Corinna Vinschen 2005-12-07 18:11:10 +00:00
parent 383840a908
commit 46bcbf8ce0
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-12-07 Corinna Vinschen <corinna@vinschen.de>
* fhandler_floppy.cc (fhandler_dev_floppy::lseek): Fix test for
valid file position at EOM.
2005-12-07 Christopher Faylor <cgf@timesys.com>
* include/cygwin/stdlib.h: Guard compilation of *unsetenv* in newlib.

View File

@ -380,7 +380,7 @@ fhandler_dev_floppy::lseek (_off64_t offset, int whence)
whence = SEEK_SET;
}
if (whence != SEEK_SET || lloffset < 0 || lloffset >= drive_size)
if (whence != SEEK_SET || lloffset < 0 || lloffset > drive_size)
{
set_errno (EINVAL);
return -1;