From e2f7831640fc7eb191ee5df3594f00518d1250b8 Mon Sep 17 00:00:00 2001 From: lukka Date: Wed, 18 Nov 1998 00:57:16 +0000 Subject: [PATCH] *** empty log message *** --- ChangeLog | 7 +++++++ ChangeLog.pre-2-0 | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-2 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gtk/gtktypeutils.c | 10 +++++++++- 8 files changed, 58 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a3c1835e7..00f2f41a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Nov 17 1998 Tuomas Lukka + + * gtk/gtktypeutils.c: Fix vital bug where LOOKUP was used when + getting types even though we were not using real type names, + just the index. This caused random crashes when more than + 256 types were defined. + 1998-11-17 Martin Baulig * gtk/genmarshal.pl: Put output files in the current directory diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index a3c1835e7..00f2f41a3 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +Tue Nov 17 1998 Tuomas Lukka + + * gtk/gtktypeutils.c: Fix vital bug where LOOKUP was used when + getting types even though we were not using real type names, + just the index. This caused random crashes when more than + 256 types were defined. + 1998-11-17 Martin Baulig * gtk/genmarshal.pl: Put output files in the current directory diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index a3c1835e7..00f2f41a3 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Tue Nov 17 1998 Tuomas Lukka + + * gtk/gtktypeutils.c: Fix vital bug where LOOKUP was used when + getting types even though we were not using real type names, + just the index. This caused random crashes when more than + 256 types were defined. + 1998-11-17 Martin Baulig * gtk/genmarshal.pl: Put output files in the current directory diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index a3c1835e7..00f2f41a3 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Tue Nov 17 1998 Tuomas Lukka + + * gtk/gtktypeutils.c: Fix vital bug where LOOKUP was used when + getting types even though we were not using real type names, + just the index. This caused random crashes when more than + 256 types were defined. + 1998-11-17 Martin Baulig * gtk/genmarshal.pl: Put output files in the current directory diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index a3c1835e7..00f2f41a3 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Tue Nov 17 1998 Tuomas Lukka + + * gtk/gtktypeutils.c: Fix vital bug where LOOKUP was used when + getting types even though we were not using real type names, + just the index. This caused random crashes when more than + 256 types were defined. + 1998-11-17 Martin Baulig * gtk/genmarshal.pl: Put output files in the current directory diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index a3c1835e7..00f2f41a3 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Tue Nov 17 1998 Tuomas Lukka + + * gtk/gtktypeutils.c: Fix vital bug where LOOKUP was used when + getting types even though we were not using real type names, + just the index. This caused random crashes when more than + 256 types were defined. + 1998-11-17 Martin Baulig * gtk/genmarshal.pl: Put output files in the current directory diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index a3c1835e7..00f2f41a3 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Tue Nov 17 1998 Tuomas Lukka + + * gtk/gtktypeutils.c: Fix vital bug where LOOKUP was used when + getting types even though we were not using real type names, + just the index. This caused random crashes when more than + 256 types were defined. + 1998-11-17 Martin Baulig * gtk/genmarshal.pl: Put output files in the current directory diff --git a/gtk/gtktypeutils.c b/gtk/gtktypeutils.c index 165a8d08c..27c20eb5e 100644 --- a/gtk/gtktypeutils.c +++ b/gtk/gtktypeutils.c @@ -96,7 +96,15 @@ gtk_type_node_next_and_invalidate (void) new_type = n_type_nodes++; n_free_type_nodes--; - LOOKUP_TYPE_NODE (node, new_type); + /* This can't be used here - new_type can be over 256! + * LOOKUP_TYPE_NODE (node, new_type); + * Code copied from above (we may assume we are all right here): + */ + + if(new_type == 0) + return NULL; + node = type_nodes + new_type; + if (node) node->type = new_type;