natFileDescriptorWin32.cc (read): Return -1 if zero bytes read and no failure code returned.

2002-03-09  Adam Megacz  <adam@xwt.org>

        * java/io/natFileDescriptorWin32.cc (read): Return -1 if zero
        bytes read and no failure code returned.

From-SVN: r50519
This commit is contained in:
Adam Megacz 2002-03-10 03:34:27 +00:00 committed by Adam Megacz
parent aa7543832a
commit 828c1ddccc
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-03-09 Adam Megacz <adam@xwt.org>
* java/io/natFileDescriptorWin32.cc (read): Return -1 if zero
bytes read and no failure code returned.
2002-03-09 Adam Megacz <adam@xwt.org>
* win32.cc (_CRT_MT, __mingwthr_key_dtor) Added fake

View File

@ -255,6 +255,7 @@ java::io::FileDescriptor::read(jbyteArray buffer, jint offset, jint count)
if (! ReadFile((HANDLE)fd, bytes, count, &read, NULL))
throw new IOException (JvNewStringLatin1 (winerr ()));
if (read == 0) return -1;
return (jint)read;
}