* src/android.c (initEmacs): NULL-terminate c_argv.
android_java_env = env;
nelements = (*env)->GetArrayLength (env, argv);
- c_argv = alloca (sizeof *c_argv * nelements);
+ c_argv = alloca (sizeof *c_argv * (nelements + 1));
for (i = 0; i < nelements; ++i)
{
(*env)->ReleaseStringUTFChars (env, (jstring) argument, c_argument);
}
+ c_argv[nelements] = NULL;
+
android_init_emacs_service ();
android_init_emacs_pixmap ();
android_init_graphics_point ();