From: John Darrington Date: Sun, 6 Jan 2013 16:01:34 +0000 (+0100) Subject: GET DATA: Produce explicit error on invalid sheet index. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f00d3284fc1895e249d35d448cff76e3b115b5b2;p=pspp GET DATA: Produce explicit error on invalid sheet index. --- diff --git a/src/language/data-io/get-data.c b/src/language/data-io/get-data.c index 3ae426c84a..ac2944caee 100644 --- a/src/language/data-io/get-data.c +++ b/src/language/data-io/get-data.c @@ -227,6 +227,11 @@ parse_spreadsheet (struct lexer *lexer) else if (lex_match_id (lexer, "INDEX")) { sri->sheet_index = lex_integer (lexer); + if (sri->sheet_index <= 0) + { + msg (SE, _("The sheet index must be greater than or equal to 1")); + goto error; + } lex_get (lexer); } else