From 5aa7acd92ba8fc2c6554e99e2cdb796e057feedc Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 30 Jun 2014 08:46:53 +0000 Subject: [PATCH] From Pjotr Svetachov, "Here is a small fix for a overflow when editing large 3d volume data." git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.2@14328 16af8721-9629-0410-8352-f15c8da7e697 --- include/osg/Image | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/osg/Image b/include/osg/Image index d96a655a8..fb2dcaa78 100644 --- a/include/osg/Image +++ b/include/osg/Image @@ -302,13 +302,13 @@ class OSG_EXPORT Image : public BufferData * take care to access the data per row rather than treating the whole data as a single block. */ inline const unsigned char* data() const { return _data; } - inline unsigned char* data(int column, int row=0,int image=0) + inline unsigned char* data(unsigned int column, unsigned int row = 0, unsigned int image = 0) { if (!_data) return NULL; return _data+(column*getPixelSizeInBits())/8+row*getRowStepInBytes()+image*getImageSizeInBytes(); } - inline const unsigned char* data(int column, int row=0,int image=0) const + inline const unsigned char* data(unsigned int column, unsigned int row = 0, unsigned int image = 0) const { if (!_data) return NULL; return _data+(column*getPixelSizeInBits())/8+row*getRowStepInBytes()+image*getImageSizeInBytes();