From 758393951233d1b2520cf4cefd33ec4288a3880a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 12 Sep 2018 11:09:40 +1000 Subject: [PATCH] xkb: fix what looks to be a copy-paste error with first vs firstMM Pointed out by coverity. Signed-off-by: Dave Airlie --- xkb/xkb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkb/xkb.c b/xkb/xkb.c index 0fe6ebf4a..764079506 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -2570,7 +2570,7 @@ _XkbSetMap(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req, char *values) first = last = 0; if (change.map.num_modmap_keys > 0) { firstMM = change.map.first_modmap_key; - lastMM = first + change.map.num_modmap_keys - 1; + lastMM = firstMM + change.map.num_modmap_keys - 1; } else firstMM = lastMM = 0;