Fix a crash when specifying punctuation characters.

This commit is contained in:
Reece H. Dunn
2013-09-19 11:19:59 +01:00
parent daf4b318c5
commit f0fa441131
+1 -1
View File
@@ -80,7 +80,7 @@ unicode_string::unicode_string(JNIEnv *env, jstring str)
if (str == NULL) return;
const char *utf8 = env->GetStringUTFChars(str, NULL);
mString = (wchar_t *)malloc(strlen(utf8) + 1);
mString = (wchar_t *)malloc((strlen(utf8) + 1) * sizeof(wchar_t));
const char *utf8_current = utf8;
wchar_t *utf32_current = mString;