Commit d197252f authored by Alexandre Julliard's avatar Alexandre Julliard

libwine: Pass the correct length to GetStringUTFRegion.

Spotted by Jactry Zeng. Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 175138a4
......@@ -851,7 +851,8 @@ static jstring wine_init_jni( JNIEnv *env, jobject obj, jobjectArray cmdline, jo
{
jobject str_obj = (*env)->GetObjectArrayElement( env, cmdline, i );
length = (*env)->GetStringUTFLength( env, str_obj );
(*env)->GetStringUTFRegion( env, str_obj, 0, length, str );
(*env)->GetStringUTFRegion( env, str_obj, 0,
(*env)->GetStringLength( env, str_obj ), str );
argv[i] = str;
str[length] = 0;
str += length + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment