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:06:16 +0000 (00:06 +0200)
committerGerardo García Peña <killabytenow@gmail.com>
Thu, 11 Apr 2013 22:06:16 +0000 (00:06 +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/DecoderReplacementFallbackBuffer.cs

index 38eff7631fd81d10b58c802486b9762918e9d50f..5dd048cc91644c921f9a05bc94d65105e15e3baf 100644 (file)
@@ -61,8 +61,6 @@ namespace System.Text
                                throw new ArgumentNullException ("bytesUnknown");
                        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 || bytesUnknown.Length < index)
-                               throw new ArgumentOutOfRangeException ("index");
                        fallback_assigned = true;
                        current = 0;