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/lexactivator/LexActivator.java
Original file line number Diff line number Diff line change
Expand Up @@ -750,14 +750,14 @@ public static FeatureEntitlement GetFeatureEntitlement(String featureName) throw
public static String GetLicenseMetadata(String key) throws LexActivatorException, UnsupportedEncodingException {
int status;
if (Platform.isWindows()) {
CharBuffer buffer = CharBuffer.allocate(256);
status = LexActivatorNative.GetLicenseMetadata(new WString(key), buffer, 256);
CharBuffer buffer = CharBuffer.allocate(4096);
status = LexActivatorNative.GetLicenseMetadata(new WString(key), buffer, 4096);
if (LA_OK == status) {
return buffer.toString().trim();
}
} else {
ByteBuffer buffer = ByteBuffer.allocate(256);
status = LexActivatorNative.GetLicenseMetadata(key, buffer, 256);
ByteBuffer buffer = ByteBuffer.allocate(4096);
status = LexActivatorNative.GetLicenseMetadata(key, buffer, 4096);
if (LA_OK == status) {
return new String(buffer.array(), "UTF-8").trim();
}
Expand Down
Loading