[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Text UnicodeEncoding.
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Text UnicodeEncoding.cs,1.8,1.9 |
Date: |
Wed, 05 Mar 2003 23:07:58 -0500 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Text
In directory subversions:/tmp/cvs-serv11267/runtime/System/Text
Modified Files:
UnicodeEncoding.cs
Log Message:
Wrong buffer index used to detect byte order marks.
Index: UnicodeEncoding.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Text/UnicodeEncoding.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** UnicodeEncoding.cs 28 Nov 2002 06:14:52 -0000 1.8
--- UnicodeEncoding.cs 6 Mar 2003 04:07:56 -0000 1.9
***************
*** 213,218 ****
if(count >= 2)
{
! if((bytes[0] == (byte)0xFE && bytes[1]
== (byte)0xFF) ||
! (bytes[0] == (byte)0xFF && bytes[1]
== (byte)0xFE))
{
return ((count - 1) / 2);
--- 213,220 ----
if(count >= 2)
{
! if((bytes[index] == (byte)0xFE &&
! bytes[index + 1] == (byte)0xFF) ||
! (bytes[index] == (byte)0xFF &&
! bytes[index + 1] == (byte)0xFE))
{
return ((count - 1) / 2);
***************
*** 254,258 ****
if(byteCount >= 2)
{
! if(bytes[0] == (byte)0xFE && bytes[1]
== (byte)0xFF)
{
isBigEndian = true;
--- 256,261 ----
if(byteCount >= 2)
{
! if(bytes[byteIndex] == (byte)0xFE &&
! bytes[byteIndex + 1] == (byte)0xFF)
{
isBigEndian = true;
***************
*** 260,264 ****
byteIndex += 2;
}
! else if(bytes[0] == (byte)0xFF &&
bytes[1] == (byte)0xFE)
{
isBigEndian = false;
--- 263,268 ----
byteIndex += 2;
}
! else if(bytes[byteIndex] == (byte)0xFF
&&
! bytes[byteIndex + 1] ==
(byte)0xFE)
{
isBigEndian = false;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Text UnicodeEncoding.cs,1.8,1.9,
Rhys Weatherley <address@hidden> <=