summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--zrle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/zrle.c b/zrle.c
index bd3c9ce..dd1b82e 100644
--- a/zrle.c
+++ b/zrle.c
@@ -29,13 +29,13 @@
#define GET_IMAGE_INTO_BUF(tx,ty,tw,th,buf) \
- char *fbptr = (cl->screen->frameBuffer \
+{ char *fbptr = (cl->screen->frameBuffer \
+ (cl->screen->paddedWidthInBytes * ty) \
+ (tx * (cl->screen->bitsPerPixel / 8))); \
\
(*cl->translateFn)(cl->translateLookupTable, &cl->screen->rfbServerFormat,\
&cl->format, fbptr, (char*)buf, \
- cl->screen->paddedWidthInBytes, tw, th);
+ cl->screen->paddedWidthInBytes, tw, th); }
#define EXTRA_ARGS , rfbClientPtr cl