Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

Commit 5e63a9c

Browse files
committed
Merge pull request #123 from misenhower/FixStreamReader
Fix an issue with StreamReader.Peek() that led to missing bytes
2 parents fb19f91 + 36f7495 commit 5e63a9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Framework/Core/System/IO/StreamReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public override int Peek()
9393
{
9494
// Move any bytes read for this character to front of new buffer
9595
int totRead;
96-
for (totRead = 0; totRead < m_curBufLen - m_curBufPos - 1; ++totRead)
96+
for (totRead = 0; totRead < m_curBufLen - m_curBufPos; ++totRead)
9797
{
9898
m_buffer[totRead] = m_buffer[m_curBufPos + totRead];
9999
}

0 commit comments

Comments
 (0)