Skip to content

Commit

Permalink
fix: fix the bug of the CosNByteBuffer put(byte) operation.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyang733 committed Sep 9, 2022
1 parent 445ddc4 commit 64cf60e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public CosNByteBuffer(ByteBuffer byteBuffer) {
}

public CosNByteBuffer put(byte b) throws IOException {
if (this.byteBuffer.hasRemaining()) {
if (!this.byteBuffer.hasRemaining()) {
throw new IOException("There is no remaining in the buffer.");
}
this.byteBuffer.put(b);
Expand Down

0 comments on commit 64cf60e

Please sign in to comment.