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:
parent
aa7543832a
commit
828c1ddccc
2 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue