[mutter/wip/carlosg/coverity-fixes: 6/13] backends/x11: Fix off by one in debug output




commit acf5e31ece483cb42e36ffba24382e6d72566011
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Oct 24 21:57:41 2021 +0200

    backends/x11: Fix off by one in debug output
    
    We are looking the atom name based on the wrong index, as the
    axis is incremented to cater for the extra CLUTTER_INPUT_AXIS_IGNORE
    value.
    
    CID: #1418330

 src/backends/x11/meta-seat-x11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/backends/x11/meta-seat-x11.c b/src/backends/x11/meta-seat-x11.c
index 2f2637ac81..c9beae384b 100644
--- a/src/backends/x11/meta-seat-x11.c
+++ b/src/backends/x11/meta-seat-x11.c
@@ -156,7 +156,7 @@ translate_valuator_class (Display             *xdisplay,
                                   class->resolution);
 
   g_debug ("Added axis '%s' (min:%.2f, max:%.2fd, res:%d) of device %d",
-           clutter_input_axis_atom_names[axis],
+           clutter_input_axis_atom_names[axis - 1],
            class->min,
            class->max,
            class->resolution,


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