[gtk+/gtk-style-context: 287/533] GtkStyleSet: Prevent from possible underflow.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 287/533] GtkStyleSet: Prevent from possible underflow.
- Date: Wed, 1 Dec 2010 02:29:56 +0000 (UTC)
commit bcc7f5acd40dd84f978bfb390cc8acaeb26b919f
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Oct 26 00:16:22 2010 +0200
GtkStyleSet: Prevent from possible underflow.
gtk/gtkstyleset.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkstyleset.c b/gtk/gtkstyleset.c
index 94a4136..6009329 100644
--- a/gtk/gtkstyleset.c
+++ b/gtk/gtkstyleset.c
@@ -309,7 +309,12 @@ compare_property (gconstpointer p1,
PropertyNode *key = (PropertyNode *) p1;
PropertyNode *node = (PropertyNode *) p2;
- return (int) key->property_quark - node->property_quark;
+ if (key->property_quark > node->property_quark)
+ return 1;
+ else if (key->property_quark < node->property_quark)
+ return -1;
+
+ return 0;
}
static PropertyNode *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]