Fix invalid memory access in ErrorDiffusionDither

This commit is contained in:
David Capello 2019-04-02 00:18:36 -03:00
parent 20b8ee0e57
commit c2af88343e

View File

@ -29,10 +29,8 @@ void ErrorDiffusionDither::start(
{
m_srcImage = srcImage;
m_width = 2+srcImage->width();
for (int i=0; i<kChannels; ++i) {
m_err[i].resize(m_width*2);
m_err[i].clear();
}
for (int i=0; i<kChannels; ++i)
m_err[i].resize(m_width*2, 0);
m_lastY = -1;
}