Bug 363986 - "nsJPEGEncoder::ReadSegments() and nsPNGEncoder::ReadSegments() do not advance read pointer" [p=daim.project@free.fr (David Marteau) r=stuart sr=bzbarsky a1.9=beltzner a=blocking1.9+]

This commit is contained in:
reed@reedloden.com 2008-01-25 00:00:18 -08:00
Родитель cf82227063
Коммит 8a806e3ee9
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -266,7 +266,7 @@ NS_IMETHODIMP nsJPEGEncoder::ReadSegments(nsWriteSegmentFun aWriter, void *aClos
aCount = maxCount;
nsresult rv = aWriter(this, aClosure,
reinterpret_cast<const char*>(mImageBuffer),
0, aCount, _retval);
mImageBufferReadPoint, aCount, _retval);
if (NS_SUCCEEDED(rv)) {
NS_ASSERTION(*_retval <= aCount, "bad write count");
mImageBufferReadPoint += *_retval;

Просмотреть файл

@ -484,7 +484,7 @@ NS_IMETHODIMP nsPNGEncoder::ReadSegments(nsWriteSegmentFun aWriter,
aCount = maxCount;
nsresult rv = aWriter(this, aClosure,
reinterpret_cast<const char*>(mImageBuffer),
0, aCount, _retval);
mImageBufferReadPoint, aCount, _retval);
if (NS_SUCCEEDED(rv)) {
NS_ASSERTION(*_retval <= aCount, "bad write count");
mImageBufferReadPoint += *_retval;