Making sure that mCountRemaining also gets updated when data gets inserted into the scanner buffer. b=117441, r=heikki, sr=jst

git-svn-id: svn://10.0.0.236/trunk@121548 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
harishd%netscape.com
2002-05-15 20:20:55 +00:00
parent 2a7d5994ae
commit 6781fe20d2
2 changed files with 8 additions and 4 deletions

View File

@@ -294,8 +294,10 @@ PRBool nsScanner::UngetReadable(const nsAString& aBuffer) {
mSlidingBuffer->UngetReadable(aBuffer,mCurrentPosition);
mSlidingBuffer->BeginReading(mCurrentPosition); // Insertion invalidated our iterators
mSlidingBuffer->EndReading(mEndPosition);
mTotalRead += aBuffer.Length();
PRUint32 length = aBuffer.Length();
mCountRemaining += length; // Ref. bug 117441
mTotalRead += length;
return PR_TRUE;
}