prims.cc (process_gcj_properties): Don't increment i within LHS of assignment.
authorBryce McKinlay <mckinlay@redhat.com>
Tue, 20 Jul 2004 15:36:56 +0000 (15:36 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Tue, 20 Jul 2004 15:36:56 +0000 (16:36 +0100)
2004-07-19  Bryce McKinlay  <mckinlay@redhat.com>

* prims.cc (process_gcj_properties): Don't increment i within LHS
of assignment.

From-SVN: r84957

libjava/ChangeLog
libjava/prims.cc

index 8f7edb16cf4acfb849b840db2f39dcf77dfecf97..07810e4756008a37827ec8ffe99a275a0adfd9e6 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-19  Bryce McKinlay  <mckinlay@redhat.com>
+
+       * prims.cc (process_gcj_properties): Don't increment i within LHS
+       of assignment.
+
 2004-07-19  Per Bothner  <per@bothner.com>
 
        Print -verbose:message on "loading", not initialization.
index 19bce1e62a059d891842b03d280dbd498c7b614d..ca8265f0df6067bc90a2cf6a61d4442cb64c2200 100644 (file)
@@ -922,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++;
       }
   }
 }