Bug 1470355 - BufferWriter should stop reading data when the wanted amount has been reached, r=michal

This commit is contained in:
Andrea Marchesini
2018-07-02 02:00:00 +03:00
parent 92a72ef340
commit aca3590963

View File

@@ -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;