Browse Source

Fix a crash when specifying punctuation characters.

master
Reece H. Dunn 11 years ago
parent
commit
f0fa441131
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      android/jni/jni/eSpeakService.cpp

+ 1
- 1
android/jni/jni/eSpeakService.cpp 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;

Loading…
Cancel
Save