From: John Darrington Date: Mon, 27 Jul 2009 09:46:43 +0000 (+0200) Subject: Prevent var sheet from traversing to an invalid cell X-Git-Tag: build37~33 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=commitdiff_plain;h=27b5e5cbc5517702d5660e2120013aa80ed6f97b Prevent var sheet from traversing to an invalid cell --- diff --git a/src/ui/gui/psppire-var-sheet.c b/src/ui/gui/psppire-var-sheet.c index a4f082cc..70e1044f 100644 --- a/src/ui/gui/psppire-var-sheet.c +++ b/src/ui/gui/psppire-var-sheet.c @@ -251,6 +251,9 @@ traverse_cell_callback (PsppireSheet *sheet, gint n_vars = psppire_var_store_get_var_cnt (var_store); + if (new_cell->col >= PSPPIRE_VAR_STORE_n_COLS) + return TRUE; + if (new_cell->row >= n_vars && !var_sheet->may_create_vars) return TRUE;