summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-10-23 02:49:22 +0300
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-10-23 02:49:22 +0300
commit562096a012f4bb8f44d5ec6320a32f4010c189e4 (patch)
tree803dfd945092a339ba446508502a9290126a1fe9 /xkb
parenteec182259112fba240751f974f7e5ca09fce8b9d (diff)
XkbCopyKeymap: increment shapes and outlines when copying
Remember to increment the source and destination shapes when copying, instead of just endlessly copying the first one.
Diffstat (limited to 'xkb')
-rw-r--r--xkb/xkbUtils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index cddeb9e83..0c1ac9cde 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -1665,7 +1665,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
for (i = 0, sshape = src->geom->shapes, dshape = dst->geom->shapes;
i < src->geom->num_shapes;
- i++) {
+ i++, sshape++, dshape++) {
if (sshape->num_outlines) {
tmp = xcalloc(sshape->num_outlines, sizeof(XkbOutlineRec));
if (!tmp)
@@ -1676,7 +1676,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
soutline = sshape->outlines,
doutline = dshape->outlines;
j < sshape->num_outlines;
- j++) {
+ j++, soutline++, doutline++) {
if (soutline->num_points) {
tmp = xalloc(soutline->num_points *
sizeof(XkbPointRec));