From 88a8423802fa6c96993bb67a0e986d0e868606b6 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 28 Jun 2013 14:38:45 +0000 Subject: [PATCH] From Marcel Pursche, fixed checking of destination dimensions in osg::copyImage. --- src/osg/ImageUtils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osg/ImageUtils.cpp b/src/osg/ImageUtils.cpp index 6c36c9337..5feb0bb85 100644 --- a/src/osg/ImageUtils.cpp +++ b/src/osg/ImageUtils.cpp @@ -200,7 +200,7 @@ struct WriteRowOperator bool copyImage(const osg::Image* srcImage, int src_s, int src_t, int src_r, int width, int height, int depth, osg::Image* destImage, int dest_s, int dest_t, int dest_r, bool doRescale) { - if ((src_s+width) > (dest_s + destImage->s())) + if ((dest_s+width) > (destImage->s())) { OSG_NOTICE<<"copyImage("< (dest_t + destImage->t())) + if ((dest_t+height) > (destImage->t())) { OSG_NOTICE<<"copyImage("< (dest_r + destImage->r())) + if ((dest_r+depth) > (destImage->r())) { OSG_NOTICE<<"copyImage("<