Skip to content

Commit

Permalink
fix: buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
muneebkq committed Aug 6, 2024
1 parent ba7c88f commit fd47650
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/cryptlex/lexfloatclient/LexFloatClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,13 @@ public static String GetHostLicenseMetadata(String key) throws LexFloatClientExc
public static String GetFloatingClientMetadata(String key) throws LexFloatClientException, UnsupportedEncodingException {
int status;
if (Platform.isWindows()) {
CharBuffer buffer = CharBuffer.allocate(256);
CharBuffer buffer = CharBuffer.allocate(4096);
status = LexFloatClientNative.GetFloatingClientMetadata(new WString(key), buffer, 256);
if (LF_OK == status) {
return buffer.toString().trim();
}
} else {
ByteBuffer buffer = ByteBuffer.allocate(256);
ByteBuffer buffer = ByteBuffer.allocate(4096);
status = LexFloatClientNative.GetFloatingClientMetadata(key, buffer, 256);
if (LF_OK == status) {
return new String(buffer.array(), "UTF-8");
Expand Down

0 comments on commit fd47650

Please sign in to comment.