imcontext: Allow sequences of length GTK_MAX_COMPOSE_LEN
authorMatthias Clasen <mclasen@redhat.com>
Mon, 1 Feb 2021 05:55:25 +0000 (00:55 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 1 Feb 2021 05:55:25 +0000 (00:55 -0500)
There was an off-by-one error, making us reject sequences
of this length. But the rest of the code handles them
just fine.

Fixes: #2319
gtk/gtkcomposetable.c

index 710367b9f1f595bff77c98cee7b5d7f842758b77..901a7ecbf9e1c685db4e64a94649ee3285fd4110 100644 (file)
@@ -189,7 +189,7 @@ parse_compose_sequence (GtkComposeData *compose_data,
     }
 
   g_strfreev (words);
-  if (0 == n || n >= GTK_MAX_COMPOSE_LEN)
+  if (0 == n || n > GTK_MAX_COMPOSE_LEN)
     {
       g_warning ("The max length of compose sequences is %d: %s",
                  GTK_MAX_COMPOSE_LEN, line);