Bug 757946: don't write to underlying output stream if flush() has 0 bytes remaining. r=smontagu

This commit is contained in:
Irving Reid 2012-05-24 10:46:48 -07:00
parent 3969ee2f87
commit e183918848

View File

@ -112,6 +112,9 @@ nsConverterOutputStream::Flush()
"1024 bytes ought to be enough for everyone");
if (NS_FAILED(rv))
return rv;
if (size == 0)
return NS_OK;
PRUint32 written;
rv = mOutStream->Write(buf, size, &written);
if (NS_FAILED(rv)) {