diff options
Diffstat (limited to 'src/demos/util/MD2.java')
-rw-r--r-- | src/demos/util/MD2.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/demos/util/MD2.java b/src/demos/util/MD2.java index 25ba88f..d58b953 100644 --- a/src/demos/util/MD2.java +++ b/src/demos/util/MD2.java @@ -493,7 +493,7 @@ public class MD2 { pos += numRead; } avail = in.available(); - } while (numRead >= 0); + } while (avail > 0 && numRead >= 0); ByteBuffer buf = ByteBuffer.allocateDirect(pos); buf.put(data, 0, pos); buf.rewind(); |