if ( lex_match_id (lexer, "ASSUMEDSTRWIDTH"))
{
lex_match (lexer, T_EQUALS);
- psql.str_width = lex_integer (lexer);
- lex_get (lexer);
+ if (lex_force_int (lexer))
+ {
+ psql.str_width = lex_integer (lexer);
+ lex_get (lexer);
+ }
}
else if ( lex_match_id (lexer, "BSIZE"))
{
lex_match (lexer, T_EQUALS);
- psql.bsize = lex_integer (lexer);
- lex_get (lexer);
+ if (lex_force_int (lexer))
+ {
+ psql.bsize = lex_integer (lexer);
+ lex_get (lexer);
+ }
}
else if ( lex_match_id (lexer, "UNENCRYPTED"))
{
if ( lex_match_id (lexer, "ASSUMEDSTRWIDTH"))
{
lex_match (lexer, T_EQUALS);
- opts->asw = lex_integer (lexer);
- lex_get (lexer);
+ if (lex_force_int (lexer))
+ {
+ opts->asw = lex_integer (lexer);
+ lex_get (lexer);
+ }
}
else if (lex_match_id (lexer, "SHEET"))
{
}
else if (lex_match_id (lexer, "INDEX"))
{
+ if (!lex_force_int (lexer))
+ goto error;
+
opts->sheet_index = lex_integer (lexer);
if (opts->sheet_index <= 0)
{
/* PSPP - a program for statistical analysis. -*-c-*-
- Copyright (C) 2006, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008, 2009, 2010, 2011, 2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
if ( lex_match (lexer, T_ASTERISK))
{
n = f;
+ if (!lex_force_num (lexer))
+ return 0;
f = lex_number (lexer);
lex_get (lexer);
}