From ddb1fc15a15990036065c368ba243f8d5db853ef Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 27 Mar 2016 20:06:33 +0100 Subject: [PATCH] Fix relative positioning between two new elements in gprefs(). It was only prepared to position a new element relative to an existing one if the latter was specified in the saved configuration, not if the latter was another element new to this run of gprefs(). This wasn't deliberate at all: it was just due to me failing to update the 'seen' bitmap in the loop adding new elements. --- settings.c | 1 + 1 file changed, 1 insertion(+) diff --git a/settings.c b/settings.c index 9c772980..b15839fa 100644 --- a/settings.c +++ b/settings.c @@ -386,6 +386,7 @@ static void gprefs(void *sesskey, const char *name, const char *def, conf_set_int_int(conf, primary, j+1, conf_get_int_int(conf, primary, j)); conf_set_int_int(conf, primary, pos, mapping[i].v); + seen |= (1 << mapping[i].v); n++; } } -- 2.45.2