From fba1dfcf68c126ef1a8cd329865cfe84c8c7a443 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Wed, 6 Jul 2005 19:56:34 +0000 Subject: [project @ 2005-07-06 19:56:34 by bursa] Fix broken code in table_find_cell(). svn path=/import/netsurf/; revision=1788 --- render/table.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/render/table.c b/render/table.c index 3896f27da..892596dad 100644 --- a/render/table.c +++ b/render/table.c @@ -350,10 +350,11 @@ void table_remove_borders(struct css_style *style) struct box *table_find_cell(struct box *table, unsigned int x, unsigned int y) { - struct box *row_group, *row = 0, *cell; + struct box *row_group, *row, *cell; unsigned int row_num = 0; - if (table->columns < x || table->rows < y) + if (table->columns <= x || table->rows <= y) + return 0; for (row_group = table->children, row = row_group->children; row_num != y; -- cgit v1.2.3