Fix a bug that could cause assertion failure. (#5575)
Co-authored-by: macmini <xhnsworks2@icloud.com> Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>pull/5595/head
parent
6fa4f0ff5e
commit
ec5242a1a0
|
@ -148,9 +148,11 @@ void Bitmap::WriteData(aiTexture *texture, IOStream *file) {
|
||||||
|
|
||||||
file->Write(pixel, mBytesPerPixel, 1);
|
file->Write(pixel, mBytesPerPixel, 1);
|
||||||
}
|
}
|
||||||
|
// When padding is 0, passing it as an argument will cause an assertion failure in DefaultIOStream::Write.
|
||||||
|
if (padding) {
|
||||||
file->Write(padding_data, padding, 1);
|
file->Write(padding_data, padding, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Assimp
|
} // namespace Assimp
|
||||||
|
|
Loading…
Reference in New Issue