* UTF32Encoding.cs : fixed wrong range in GetByteCount(). Patch by
David Michell.
svn path=/trunk/mcs/; revision=125648
+2009-02-04 Atsushi Enomoto <atsushi@ximian.com>
+
+ * UTF32Encoding.cs : fixed wrong range in GetByteCount(). Patch by
+ David Michell.
+
2009-01-30 Atsushi Enomoto <atsushi@ximian.com>
* UTF8Encoding.cs : surrogate characters are handled in
throw new ArgumentOutOfRangeException ("count", _("ArgRange_Array"));
}
int ret = 0;
- for (int i = index; i < count; i++) {
+ for (int i = index; i < index + count; i++) {
if (Char.IsSurrogate (chars [i])) {
if (i + 1 < chars.Length && Char.IsSurrogate (chars [i + 1]))
ret += 4;