Skip to content

Commit

Permalink
Merge pull request #384 from lapo-luchini/patch-1
Browse files Browse the repository at this point in the history
Fix encoding of ByteBuffer.append(long) > 16777216
  • Loading branch information
andreasrosdal authored Jun 23, 2020
2 parents ae70d26 + 1e460d5 commit 69857b6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions openpdf/src/main/java/com/lowagie/text/pdf/ByteBuffer.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,18 @@ public ByteBuffer append(ByteBuffer buf) {
* @return a reference to this <CODE>ByteBuffer</CODE> object
*/
public ByteBuffer append(int i) {
return append((double)i);
return append(String.valueOf(i));
}


/**
* Appends the string representation of a <CODE>long</CODE>.
* @param l the <CODE>long</CODE> to be appended
* @return a reference to this <CODE>ByteBuffer</CODE> object
*/
public ByteBuffer append(long l) {
return append(String.valueOf(l));
}

public ByteBuffer append(byte b) {
return append_i(b);
}
Expand Down

0 comments on commit 69857b6

Please sign in to comment.