From 5fb078b4f13b6ad1d13bcf266ba364730f18633a Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 30 Jun 2014 08:46:54 +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/trunk@14329 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 ca8a2b3d9..4e01e3af1 100644 --- a/include/osg/Image +++ b/include/osg/Image @@ -316,13 +316,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();