[gtk+] GtkStyleSet: Prevent from possible underflow.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkStyleSet: Prevent from possible underflow.
- Date: Sat, 4 Dec 2010 15:06:32 +0000 (UTC)
commit c88e3bfc0c3e89bc09d4b3604fe62e4a3d11b2a5
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]