Reallocate float image data properly. Fixes issue 155.
This commit is contained in:
parent
3ee2c39be4
commit
3265c36e14
@ -155,7 +155,7 @@ void FloatImage::resizeChannelCount(uint c)
|
||||
{
|
||||
if (m_componentNum != c) {
|
||||
uint count = m_width * m_height * c;
|
||||
realloc<float>(m_mem, count);
|
||||
m_mem = realloc<float>(m_mem, count);
|
||||
|
||||
if (c > m_componentNum) {
|
||||
memset(m_mem + m_count, 0, (count - m_count) * sizeof(float));
|
||||
|
Loading…
Reference in New Issue
Block a user