diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 6 | ||||
-rw-r--r-- | gtk/gtkfontsel.c | 31 |
8 files changed, 59 insertions, 14 deletions
@@ -1,3 +1,9 @@ +Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfontsel.c: Don't access *bitmapped_sizes + if nbitmapped_sizes == 0. (Pointed out by + zucchi@zedzone.fsi.com.au (Michael Zucchi)) + Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 872069403..c6539fa33 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfontsel.c: Don't access *bitmapped_sizes + if nbitmapped_sizes == 0. (Pointed out by + zucchi@zedzone.fsi.com.au (Michael Zucchi)) + Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 872069403..c6539fa33 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfontsel.c: Don't access *bitmapped_sizes + if nbitmapped_sizes == 0. (Pointed out by + zucchi@zedzone.fsi.com.au (Michael Zucchi)) + Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 872069403..c6539fa33 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfontsel.c: Don't access *bitmapped_sizes + if nbitmapped_sizes == 0. (Pointed out by + zucchi@zedzone.fsi.com.au (Michael Zucchi)) + Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 872069403..c6539fa33 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfontsel.c: Don't access *bitmapped_sizes + if nbitmapped_sizes == 0. (Pointed out by + zucchi@zedzone.fsi.com.au (Michael Zucchi)) + Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 872069403..c6539fa33 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfontsel.c: Don't access *bitmapped_sizes + if nbitmapped_sizes == 0. (Pointed out by + zucchi@zedzone.fsi.com.au (Michael Zucchi)) + Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 872069403..c6539fa33 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkfontsel.c: Don't access *bitmapped_sizes + if nbitmapped_sizes == 0. (Pointed out by + zucchi@zedzone.fsi.com.au (Michael Zucchi)) + Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c index 537af39f8..060d56ed2 100644 --- a/gtk/gtkfontsel.c +++ b/gtk/gtkfontsel.c @@ -1391,10 +1391,11 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel) FontInfo *font; FontStyle *styles, *style; const guint16 *standard_sizes; - guint16 *bitmapped_sizes, bitmap_size; + guint16 *bitmapped_sizes; gint nstandard_sizes, nbitmapped_sizes; gchar buffer[16], *size; - gfloat bitmap_size_float; + gfloat bitmap_size_float = 0.; + guint16 bitmap_size = 0; gboolean can_match; gint type_filter; @@ -1437,18 +1438,20 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel) while (nstandard_sizes || nbitmapped_sizes) { can_match = TRUE; - if (fontsel->metric == GTK_FONT_METRIC_POINTS) - { - if (*bitmapped_sizes % 10 != 0) - can_match = FALSE; - bitmap_size = *bitmapped_sizes / 10; - bitmap_size_float = *bitmapped_sizes / 10; - } - else - { - bitmap_size = *bitmapped_sizes; - bitmap_size_float = *bitmapped_sizes; - } + + if (nbitmapped_sizes) + if (fontsel->metric == GTK_FONT_METRIC_POINTS) + { + if (*bitmapped_sizes % 10 != 0) + can_match = FALSE; + bitmap_size = *bitmapped_sizes / 10; + bitmap_size_float = *bitmapped_sizes / 10; + } + else + { + bitmap_size = *bitmapped_sizes; + bitmap_size_float = *bitmapped_sizes; + } if (can_match && nstandard_sizes && nbitmapped_sizes && *standard_sizes == bitmap_size) |