]> source.dussan.org Git - tigervnc.git/commitdiff
Accidentally calculated the pointer offset twice, resulting in segfaults.
authorPierre Ossman <ossman@cendio.se>
Wed, 8 Jun 2011 16:58:19 +0000 (16:58 +0000)
committerPierre Ossman <ossman@cendio.se>
Wed, 8 Jun 2011 16:58:19 +0000 (16:58 +0000)
Make sure we get the proper address for the data shuffling.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4471 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/TransImageGetter.cxx

index e2939c7b098c90414087f15cf1677c4f6c98136d..f415455492244f0013f5c25246089c03e990a8bb 100644 (file)
@@ -62,7 +62,8 @@ void TransImageGetter::getImage(void* outPtr, const Rect& r, int outStride)
 
   if (!outStride) outStride = r.width();
 
-  translateRect((void*)inPtr, inStride, r, outPtr, outStride, r.tl);
+  translateRect((void*)inPtr, inStride, Rect(0, 0, r.width(), r.height()),
+                outPtr, outStride, Point(0, 0));
 }
 
 void TransImageGetter::cmCallback(int firstColour, int nColours,