From: Finn B. <bc...@us...> - 2000-12-04 21:52:01
|
Update of /cvsroot/jython/jython/org/python/core In directory slayer.i.sourceforge.net:/tmp/cvs-serv24868 Modified Files: PyFile.java Log Message: InputStreamWrapper.read(int n): Fix bug 124028. The code was clearly wrong, but perhaps the lenght should be limited to the available number of bytes. The PyFile.read(int n) already do some looping in order to read as much as possible up to the n limit. Index: PyFile.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyFile.java,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** PyFile.java 2000/10/02 09:03:58 2.10 --- PyFile.java 2000/12/04 21:51:57 2.11 *************** *** 96,100 **** // test done by the caller int avail = istream.available(); ! n = (n > avail) ? n : avail; byte buf[] = new byte[n]; int read = istream.read(buf); --- 96,100 ---- // test done by the caller int avail = istream.available(); ! //n = (n > avail) ? n : avail; byte buf[] = new byte[n]; int read = istream.read(buf); |