From 562096a012f4bb8f44d5ec6320a32f4010c189e4 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Mon, 23 Oct 2006 02:49:22 +0300 Subject: [PATCH] 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. --- xkb/xkbUtils.c | 4 ++-- 1 file 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));