aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/gc.c')
-rw-r--r--xorg-server/dix/gc.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/xorg-server/dix/gc.c b/xorg-server/dix/gc.c
index efe6d6090..1fb577e53 100644
--- a/xorg-server/dix/gc.c
+++ b/xorg-server/dix/gc.c
@@ -127,7 +127,7 @@ ChangeGC(ClientPtr client, GC * pGC, BITS32 mask, ChangeGCValPtr pUnion)
PixmapPtr pPixmap;
BITS32 maskQ;
- assert(pUnion);
+ assert(pUnion!=NULL);
pGC->serialNumber |= GC_CHANGE_SERIAL_BIT;
maskQ = mask; /* save these for when we walk the GCque */
@@ -320,12 +320,30 @@ ChangeGC(ClientPtr client, GC * pGC, BITS32 mask, ChangeGCValPtr pUnion)
break;
}
case GCClipXOrigin:
+ #ifndef _DEBUG
NEXTVAL(INT16, pGC->clipOrg.x);
-
+ #else
+ {
+ long Val;
+ NEXTVAL(long, Val);
+ if (abs(Val)>65535)
+ ErrorF("Value received for GCClipXOrigin is too large %x\n",Val);
+ pGC->clipOrg.x=(INT16)(Val&0xffff);
+ }
+ #endif
break;
case GCClipYOrigin:
+ #ifndef _DEBUG
NEXTVAL(INT16, pGC->clipOrg.y);
-
+ #else
+ {
+ long Val;
+ NEXTVAL(long, Val);
+ if (abs(Val)>65535)
+ ErrorF("Value received for GCClipYOrigin is too large %x\n",Val);
+ pGC->clipOrg.y=(INT16)(Val&0xffff);
+ }
+ #endif
break;
case GCClipMask:
NEXT_PTR(PixmapPtr, pPixmap);