Don't access *bitmapped_sizes if nbitmapped_sizes == 0. (Pointed out by

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))
This commit is contained in:
Owen Taylor 1999-02-25 05:52:00 +00:00 committed by Owen Taylor
parent b1135416f2
commit b515672a1e
8 changed files with 59 additions and 14 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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,6 +1438,8 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel)
while (nstandard_sizes || nbitmapped_sizes)
{
can_match = TRUE;
if (nbitmapped_sizes)
if (fontsel->metric == GTK_FONT_METRIC_POINTS)
{
if (*bitmapped_sizes % 10 != 0)