From 25e8b874b9f58e5e8035957465252539df13a85d Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 7 Apr 2006 15:44:40 +0000 Subject: Fix signed vs unsigned char hilarity. (Bill Crawford) --- ChangeLog | 5 +++++ src/maprules.c | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index be03b08..83b613a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-04-07 Daniel Stone + + * src/maprules.c: + Fix signed vs unsigned char hilarity. (Bill Crawford) + 2006-03-27 Daniel Stone * configure.ac: diff --git a/src/maprules.c b/src/maprules.c index 7986896..ab164c6 100644 --- a/src/maprules.c +++ b/src/maprules.c @@ -1353,7 +1353,8 @@ XkbRF_GetNamesProp(Display *dpy,char **rf_rtrn,XkbRF_VarDefsPtr vd_rtrn) Atom rules_atom,actual_type; int fmt; unsigned long nitems,bytes_after; -char *data,*out; +unsigned char *data; +char *out, *end; Status rtrn; rules_atom= XInternAtom(dpy,_XKB_RF_NAMES_PROP_ATOM,True); @@ -1374,35 +1375,36 @@ Status rtrn; return (fmt==0?True:False); } - out= data; + out=(char*)data; + end=out+nitems; if (out && (*out) && rf_rtrn) *rf_rtrn= _XkbDupString(out); out+=strlen(out)+1; - if ((out-data)model= _XkbDupString(out); out+=strlen(out)+1; } - if ((out-data)layout= _XkbDupString(out); out+=strlen(out)+1; } - if ((out-data)variant= _XkbDupString(out); out+=strlen(out)+1; } - - if ((out-data)options= _XkbDupString(out); out+=strlen(out)+1; } + XFree(data); return True; } -- cgit v1.2.3