Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/java/com/cryptlex/lexfloatclient/LexFloatClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -353,14 +353,14 @@ 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);
status = LexFloatClientNative.GetFloatingClientMetadata(new WString(key), buffer, 256);
CharBuffer buffer = CharBuffer.allocate(4096);
status = LexFloatClientNative.GetFloatingClientMetadata(new WString(key), buffer, 4096);
if (LF_OK == status) {
return buffer.toString().trim();
}
} else {
ByteBuffer buffer = ByteBuffer.allocate(256);
status = LexFloatClientNative.GetFloatingClientMetadata(key, buffer, 256);
ByteBuffer buffer = ByteBuffer.allocate(4096);
status = LexFloatClientNative.GetFloatingClientMetadata(key, buffer, 4096);
if (LF_OK == status) {
return new String(buffer.array(), "UTF-8");
}
Expand Down