From 4152deb7c4f2ef96052d1d3d84ea12a3306f040d Mon Sep 17 00:00:00 2001 From: Brian Matzon Date: Thu, 19 Apr 2007 22:21:04 +0000 Subject: [PATCH] using NewStringNativeWithLength --- src/native/windows/org_lwjgl_Sys.c | 2 +- src/native/windows/org_lwjgl_opengl_WindowsRegistry.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/native/windows/org_lwjgl_Sys.c b/src/native/windows/org_lwjgl_Sys.c index 4cffd05d..ee1f9374 100644 --- a/src/native/windows/org_lwjgl_Sys.c +++ b/src/native/windows/org_lwjgl_Sys.c @@ -105,7 +105,7 @@ JNIEXPORT jstring JNICALL Java_org_lwjgl_WindowsSysImplementation_getClipboard CloseClipboard(); return NULL; } - ret = NewStringNative(env, (const char *) clipboard_data); + ret = NewStringNativeWithLength(env, (const char *) clipboard_data, strlen(clipboard_data)); } else { return NULL; } diff --git a/src/native/windows/org_lwjgl_opengl_WindowsRegistry.c b/src/native/windows/org_lwjgl_opengl_WindowsRegistry.c index b070d801..b345588d 100644 --- a/src/native/windows/org_lwjgl_opengl_WindowsRegistry.c +++ b/src/native/windows/org_lwjgl_opengl_WindowsRegistry.c @@ -93,7 +93,7 @@ static jstring queryRegistrationKey(JNIEnv *env, HKEY root_key, LPCTSTR subkey, return NULL; } result[buf_size - 1] = '\0'; - java_result = NewStringNative(env, result); + java_result = NewStringNativeWithLength(env, result, strlen(result)); free(result); return java_result; }