removed index check because (1) it cannot be checked in this context and (2) it
authorGerardo García Peña <killabytenow@gmail.com>
Thu, 11 Apr 2013 22:12:29 +0000 (00:12 +0200)
committerGerardo García Peña <killabytenow@gmail.com>
Thu, 11 Apr 2013 22:12:29 +0000 (00:12 +0200)
only explains when a bad sequence started in the current or past buffer (in
this case it would take a negative value).

mcs/class/corlib/System.Text/EncoderReplacementFallbackBuffer.cs

index 7bf94251ac9467a9e1f623269eb30c5c98eae079..5d5fddac620c291925bf4400e416a457affad52b 100644 (file)
@@ -70,8 +70,6 @@ namespace System.Text
                {
                        if (fallback_assigned && Remaining != 0)
                                throw new ArgumentException ("Reentrant Fallback method invocation occured. It might be because either this FallbackBuffer is incorrectly shared by multiple threads, invoked inside Encoding recursively, or Reset invocation is forgotten.");
-                       if (index < 0)
-                               throw new ArgumentOutOfRangeException ("index");
                        fallback_assigned = true;
                        current = 0;