Skip to content

Commit

Permalink
Increase buffer size to fix "set clipboard" event
Browse files Browse the repository at this point in the history
The buffer size must be greater than any event message.

Clipboard events may take up to 4096 bytes, so increase the buffer size.

Fixes #1425 <#1425>
  • Loading branch information
rom1v committed May 24, 2020
1 parent acc4ef3 commit 517dbd9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public class ControlMessageReader {

public static final int CLIPBOARD_TEXT_MAX_LENGTH = 4093;
public static final int INJECT_TEXT_MAX_LENGTH = 300;
private static final int RAW_BUFFER_SIZE = 1024;

private static final int RAW_BUFFER_SIZE = 4096;

private final byte[] rawBuffer = new byte[RAW_BUFFER_SIZE];
private final ByteBuffer buffer = ByteBuffer.wrap(rawBuffer);
Expand Down

0 comments on commit 517dbd9

Please sign in to comment.