From: Pierre Ossman Date: Wed, 8 Jun 2011 16:58:19 +0000 (+0000) Subject: Accidentally calculated the pointer offset twice, resulting in segfaults. X-Git-Tag: v1.1.90~309 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=494271583e29d6d15036989322c62f88f941bc32;p=tigervnc.git Accidentally calculated the pointer offset twice, resulting in segfaults. 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 --- diff --git a/common/rfb/TransImageGetter.cxx b/common/rfb/TransImageGetter.cxx index e2939c7b..f4154554 100644 --- a/common/rfb/TransImageGetter.cxx +++ b/common/rfb/TransImageGetter.cxx @@ -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,