Commit b515672a authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

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))
parent b1135416
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
......
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
......
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
......
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
......
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
......
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
......
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
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment