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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user