MonoGenericClass::initialize runtime icall only needs fields.
[mono.git] / mcs / class / corlib / System / Environment.cs
index eec317615e172d96570b2fed414e9e6c6130b07f..496fdc7c46b7ff7a885ab64a196accb25dfdec12 100644 (file)
@@ -56,7 +56,7 @@ namespace System {
                 * of icalls, do not require an increment.
                 */
 #pragma warning disable 169
-               private const int mono_corlib_version = 102;
+               private const int mono_corlib_version = 104;
 #pragma warning restore 169
 
                [ComVisible (true)]
@@ -366,6 +366,7 @@ namespace System {
                                // If value not found, add %FOO to stream,
                                //  and use the closing % for the next iteration.
                                // If value found, expand it in place of %FOO%
+                               int realOldOff2 = off2;
                                if (value == null) {
                                        result.Append ('%');
                                        result.Append (var);
@@ -389,7 +390,7 @@ namespace System {
                                // If value not found in current iteration, but a % was found for next iteration,
                                //  use text from current closing % to the next %.
                                else
-                                       textLen = off1 - oldOff2;
+                                       textLen = off1 - realOldOff2;
                                if(off1 >= oldOff2 || off1 == -1)
                                        result.Append (name, oldOff2+1, textLen);
                        } while (off2 > -1 && off2 < len);