[mutter/wip/carlosg/coverity-fixes: 1/8] backends/x11: Fix off by one in debug output
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/coverity-fixes: 1/8] backends/x11: Fix off by one in debug output
- Date: Mon, 25 Oct 2021 12:03:02 +0000 (UTC)
commit d4c5244eea775d81a0efb3ea43852f9c70265f80
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 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/backends/x11/meta-seat-x11.c b/src/backends/x11/meta-seat-x11.c
index 2f2637ac81..0cfa2e510d 100644
--- a/src/backends/x11/meta-seat-x11.c
+++ b/src/backends/x11/meta-seat-x11.c
@@ -156,7 +156,9 @@ 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],
+ axis == CLUTTER_INPUT_AXIS_IGNORE ?
+ "Ignored" :
+ 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]