using NewStringNativeWithLength
This commit is contained in:
parent
3630ebd6c2
commit
4152deb7c4
|
@ -105,7 +105,7 @@ JNIEXPORT jstring JNICALL Java_org_lwjgl_WindowsSysImplementation_getClipboard
|
||||||
CloseClipboard();
|
CloseClipboard();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
ret = NewStringNative(env, (const char *) clipboard_data);
|
ret = NewStringNativeWithLength(env, (const char *) clipboard_data, strlen(clipboard_data));
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ static jstring queryRegistrationKey(JNIEnv *env, HKEY root_key, LPCTSTR subkey,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
result[buf_size - 1] = '\0';
|
result[buf_size - 1] = '\0';
|
||||||
java_result = NewStringNative(env, result);
|
java_result = NewStringNativeWithLength(env, result, strlen(result));
|
||||||
free(result);
|
free(result);
|
||||||
return java_result;
|
return java_result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue