From 34986dedf03800ca7b7bea65248e637e01b3071f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 15 Sep 2005 20:55:35 +0000 Subject: [PATCH] Changed destinationRowDelta and destination_pixelSpace to int's, solving a memory corruption crash under 64 bit build. --- src/osgTerrain/DataSet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osgTerrain/DataSet.cpp b/src/osgTerrain/DataSet.cpp index 285eb58fd..1575a81f7 100644 --- a/src/osgTerrain/DataSet.cpp +++ b/src/osgTerrain/DataSet.cpp @@ -710,10 +710,10 @@ void DataSet::SourceData::readImage(DestinationData& destination) // now copy into destination image unsigned char* sourceRowPtr = tempImage; - unsigned int sourceRowDelta = pixelSpace*destWidth; + int sourceRowDelta = pixelSpace*destWidth; unsigned char* destinationRowPtr = destination._image->data(destX,destY+destHeight-1); - unsigned int destinationRowDelta = -(int)(destination._image->getRowSizeInBytes()); - unsigned int destination_pixelSpace = destination._image->getPixelSizeInBits()/8; + int destinationRowDelta = -(int)(destination._image->getRowSizeInBytes()); + int destination_pixelSpace = destination._image->getPixelSizeInBits()/8; bool destination_hasAlpha = osg::Image::computeNumComponents(destination._image->getPixelFormat())==4; // copy image to destination image