[Spice-devel] [spice-gtk v2] Avoid to access array with negative numbers

Frediano Ziglio fziglio at redhat.com
Wed Mar 23 15:40:10 UTC 2016


---
 src/spice-widget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Changes from v1:
- make parameter guint as GdkEventButton::button is guint.

diff --git a/src/spice-widget.c b/src/spice-widget.c
index 19753e7..b1a9423 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -1539,7 +1539,7 @@ static gboolean focus_out_event(GtkWidget *widget, GdkEventFocus *focus G_GNUC_U
     return true;
 }
 
-static int button_gdk_to_spice(int gdk)
+static int button_gdk_to_spice(guint gdk)
 {
     static const int map[] = {
         [ 1 ] = SPICE_MOUSE_BUTTON_LEFT,
-- 
2.5.5



More information about the Spice-devel mailing list