[gtk+/gtk-style-context] GtkStyleSet: Prevent from possible underflow.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context] GtkStyleSet: Prevent from possible underflow.
- Date: Mon, 25 Oct 2010 22:45:38 +0000 (UTC)
commit 49369e6b5079cda1b5a1bb8c422bf807b469717d
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]