2004-05-30 Michael Koch <konqueror@gmx.de>
* java/nio/Buffer.java (limit): Fixed off by one error. * java/nio/CharBuffer.java (wrap): Fixed arguments, added javadocs. From-SVN: r82448
This commit is contained in:
parent
74c2dbf7a1
commit
1b2545bcf2
3 changed files with 46 additions and 20 deletions
|
@ -148,11 +148,11 @@ public abstract class Buffer
|
|||
if ((newLimit < 0) || (newLimit > cap))
|
||||
throw new IllegalArgumentException ();
|
||||
|
||||
if (newLimit <= mark)
|
||||
if (newLimit < mark)
|
||||
mark = -1;
|
||||
|
||||
if (pos > newLimit)
|
||||
pos = newLimit - 1;
|
||||
pos = newLimit;
|
||||
|
||||
limit = newLimit;
|
||||
return this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue