summaryrefslogtreecommitdiff
path: root/gtk/gtktable.c
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2001-06-08 16:50:58 +0000
committerJonathan Blandford <jrb@src.gnome.org>2001-06-08 16:50:58 +0000
commit72ef055bde913c993d4a38964542b1d1c4470e1b (patch)
tree1a0dfa26b1f5655535800ada3676d685d2e22f47 /gtk/gtktable.c
parentda562f4dc8db7722ffc89198d42eb9e2efbda62a (diff)
downloadgtk+-72ef055bde913c993d4a38964542b1d1c4470e1b.tar.gz
warn if row/cols are out of range. Fix bug #55921
Fri Jun 8 12:38:49 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktable.c (gtk_table_resize): warn if row/cols are out of range. Fix bug #55921 * gtk/gtkliststore.c (gtk_list_store_new_with_types): fix doc bug (#55920). Fri Jun 8 12:38:49 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktable.c (gtk_table_resize): warn if row/cols are out of range. Fix bug #55921 * gtk/gtkliststore.c (gtk_list_store_new_with_types): fix doc bug (#55920).
Diffstat (limited to 'gtk/gtktable.c')
-rw-r--r--gtk/gtktable.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtktable.c b/gtk/gtktable.c
index 037e3e2199..98e7709fe8 100644
--- a/gtk/gtktable.c
+++ b/gtk/gtktable.c
@@ -469,12 +469,13 @@ gtk_table_resize (GtkTable *table,
guint n_rows,
guint n_cols)
{
- g_return_if_fail (table != NULL);
g_return_if_fail (GTK_IS_TABLE (table));
+ g_return_if_fail (n_rows > 0 && n_rows < 65536);
+ g_return_if_fail (n_rows > 0 && n_cols < 65536);
n_rows = MAX (n_rows, 1);
n_cols = MAX (n_cols, 1);
-
+
if (n_rows != table->nrows ||
n_cols != table->ncols)
{