Bug 1470355 - BufferWriter should stop reading data when the wanted amount has been reached, r=michal
This commit is contained in:
@@ -1674,6 +1674,11 @@ private:
|
||||
if (mCount != -1) {
|
||||
MOZ_ASSERT(mCount >= writtenData);
|
||||
mCount -= writtenData;
|
||||
|
||||
// Is this the end of the reading?
|
||||
if (mCount == 0) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user