We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code will crash in Avian:
jstring javaStr = (*jni)->NewString(jni, (jchar *)buffer, 0);
This patch will fix it:
diff --git a/VM/avian/jnienv.cpp b/VM/avian/jnienv.cpp index 9e1d7e9..52da955 100644 --- a/VM/avian/jnienv.cpp +++ b/VM/avian/jnienv.cpp @@ -241,9 +241,8 @@ newString(Thread* t, uintptr_t* arguments) const jchar* chars = reinterpret_cast<const jchar*>(arguments[0]); jsize size = arguments[1]; - object a = 0; + object a = makeCharArray(t, size); if (size) { - a = makeCharArray(t, size); memcpy(&charArrayBody(t, a, 0), chars, size * sizeof(jchar)); }
The text was updated successfully, but these errors were encountered:
Thanks; I've applied your patch:
ab5ec51
Sorry, something went wrong.
No branches or pull requests
The following code will crash in Avian:
jstring javaStr = (*jni)->NewString(jni, (jchar *)buffer, 0);
This patch will fix it:
The text was updated successfully, but these errors were encountered: