From Pjotr Svetachov, "I had the osgvolume example crash on me when loading large volume

datasets due to an overflow in image.cpp after a unneeded cast from
unsigned int to int. Here is a small fix."
remotes/origin/OpenSceneGraph-3.4
Robert Osfield 11 years ago
parent 4dd3e3562f
commit 2bb4e0566c

@ -239,7 +239,7 @@ Image::Image(const Image& image,const CopyOp& copyop):
{
if (image._data)
{
int size = image.getTotalSizeInBytesIncludingMipmaps();
unsigned int size = image.getTotalSizeInBytesIncludingMipmaps();
setData(new unsigned char [size],USE_NEW_DELETE);
unsigned char* dest_ptr = _data;
for(DataIterator itr(&image); itr.valid(); ++itr)

Loading…
Cancel
Save