prims.cc (process_gcj_properties): Don't increment i within LHS of assignment.
[gcc.git] / libjava / prims.cc
index 93db746fc1eefaa450407e4bfdeb4406400fd119..ca8265f0df6067bc90a2cf6a61d4442cb64c2200 100644 (file)
@@ -25,6 +25,7 @@ details.  */
 #include <jvm.h>
 #include <java-signal.h>
 #include <java-threads.h>
+#include <java-interp.h>
 
 #ifdef ENABLE_JVMPI
 #include <jvmpi.h>
@@ -921,8 +922,10 @@ process_gcj_properties ()
     // Null terminate the strings.
     while (_Jv_Environment_Properties[i].key)
       {
-       _Jv_Environment_Properties[i].key[_Jv_Environment_Properties[i].key_length] = 0;
-       _Jv_Environment_Properties[i++].value[_Jv_Environment_Properties[i].value_length] = 0;
+        property_pair *prop = &_Jv_Environment_Properties[i];
+       prop->key[prop->key_length] = 0;
+       prop->value[prop->value_length] = 0;
+       i++;
       }
   }
 }
@@ -953,6 +956,10 @@ _Jv_CreateJavaVM (void* /*vm_args*/)
   _Jv_InitThreads ();
   _Jv_InitGC ();
   _Jv_InitializeSyncMutex ();
+  
+#ifdef INTERPRETER
+  _Jv_InitInterpreter ();
+#endif  
 
 #ifdef HANDLE_SEGV
   INIT_SEGV;
@@ -1008,8 +1015,7 @@ _Jv_CreateJavaVM (void* /*vm_args*/)
   _Jv_GCInitializeFinalizers (&::gnu::gcj::runtime::FinalizerThread::finalizerReady);
 
   // Start the GC finalizer thread.  A VirtualMachineError can be
-  // thrown by the runtime if, say, threads aren't available.  In this
-  // case finalizers simply won't run.
+  // thrown by the runtime if, say, threads aren't available.
   try
     {
       using namespace gnu::gcj::runtime;