summaryrefslogtreecommitdiff
path: root/devel/directfb/files/patch-src-display-idirectfbsurface.c
blob: 79355e46710fc7844c78904fe21dc035afad0724 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- src/display/idirectfbsurface.c.orig	2007-11-02 12:19:20.000000000 +0100
+++ src/display/idirectfbsurface.c	2007-11-02 12:27:33.000000000 +0100
@@ -298,9 +298,9 @@
      if (ret)
           return ret;
 
-     (__u8*)(*ptr) += data->area.current.y * (*pitch) +
-                      data->area.current.x *
-                      DFB_BYTES_PER_PIXEL(data->surface->format);
+     *ptr = (__u8 *)(*ptr) + (data->area.current.y * (*pitch) +
+                             data->area.current.x *
+                             DFB_BYTES_PER_PIXEL(data->surface->format));
 
      data->locked = front + 1;