mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 23:36:00 +02:00
commit
1bff9e97fa
1 changed files with 5 additions and 5 deletions
|
@ -441,7 +441,7 @@ namespace System.IO
|
||||||
bytePos = byteLen = 0;*/
|
bytePos = byteLen = 0;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
return mCharLen;
|
return mCharLen - mCharPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
mByteLen += len;
|
mByteLen += len;
|
||||||
|
@ -461,7 +461,7 @@ namespace System.IO
|
||||||
//Contract.Assert(byteLen >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
|
//Contract.Assert(byteLen >= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
|
||||||
|
|
||||||
if (mByteLen == 0) // We're at EOF
|
if (mByteLen == 0) // We're at EOF
|
||||||
return mCharLen;
|
return mCharLen - mCharPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
// _isBlocked == whether we read fewer bytes than we asked for.
|
// _isBlocked == whether we read fewer bytes than we asked for.
|
||||||
|
@ -501,16 +501,16 @@ namespace System.IO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mPendingNewlineCheck) && (mCharPos < mCharLen))
|
if (mPendingNewlineCheck)
|
||||||
{
|
{
|
||||||
if (mCharBuffer[mCharPos] == '\n') mCharPos++;
|
if (mCharPos == 0 && mCharBuffer[mCharPos] == '\n') mCharPos++;
|
||||||
mPendingNewlineCheck = false;
|
mPendingNewlineCheck = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (mCharLen == mCharPos);
|
while (mCharLen == mCharPos);
|
||||||
|
|
||||||
//Console.WriteLine("ReadBuffer called. chars: "+char8Len);
|
//Console.WriteLine("ReadBuffer called. chars: "+char8Len);
|
||||||
return mCharLen;
|
return mCharLen - mCharPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetChars(uint8[] byteBuffer, int byteOffset, int byteLength, char8[] char8Buffer, int char8Offset)
|
int GetChars(uint8[] byteBuffer, int byteOffset, int byteLength, char8[] char8Buffer, int char8Offset)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue