[gtk/matthiasc/for-master: 5/5] imcontext: Allow sequences of length GTK_MAX_COMPOSE_LEN




commit 094a346539c606ae4a9e4bfcb4250b7741a4e665
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Feb 1 00:55:25 2021 -0500

    imcontext: Allow sequences of length GTK_MAX_COMPOSE_LEN
    
    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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkcomposetable.c b/gtk/gtkcomposetable.c
index 710367b9f1..901a7ecbf9 100644
--- a/gtk/gtkcomposetable.c
+++ b/gtk/gtkcomposetable.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]