From 4947aca50fd35dca4c034c8f41409d61eb4d870b Mon Sep 17 00:00:00 2001 From: Albert Graef Date: Mon, 15 Oct 2018 03:26:31 +0200 Subject: [PATCH] Fix an obscure bug in copying anyshift mod translations which might errorneously override the modulus in an existing translation. --- readconfig.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readconfig.c b/readconfig.c index 8d6035d..f64ba09 100644 --- a/readconfig.c +++ b/readconfig.c @@ -1380,7 +1380,8 @@ static void dup_stroke_data(stroke_data **sd, uint16_t *n, uint16_t *a, { for (int i = 0; i < n1; i++) { if (sd1[i].anyshift) { - for (int index = 0; index < 2; index++) { + int nindex = sd1[i].mod?1:2; // no release seq in mod translations + for (int index = 0; index < nindex; index++) { stroke **t = sd0 && check_stroke_data(sd0, sd1[i].chan, sd1[i].data, n0) ? 0 : find_stroke_data(sd, sd1[i].chan, sd1[i].data, index,