Don't return -1 when attempting to read 0 bytes.

This commit is contained in:
jfrijters 2007-09-17 05:06:34 +00:00
Родитель fa434bbd04
Коммит 2da6e524b5
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -267,6 +267,10 @@ class Net { // package-private
private static int readImpl(FileDescriptor fd, byte[] buf, int offset, int length) throws IOException
{
if (length == 0)
{
return 0;
}
try
{
if (false) throw new cli.System.Net.Sockets.SocketException();