size_t nx = 1;
size_t n_by = 0;
int vars_start = lex_ofs (lexer);
+ bool overflow = false;
do
{
by = xnrealloc (by, n_by + 1, sizeof *by);
goto done;
size_t n = by_nvar[n_by++];
if (xalloc_oversized (nx, n))
- {
- lex_ofs_error (
- lexer, vars_start, lex_ofs (lexer) - 1,
- _("Too many cross-tabulation variables or dimensions."));
- goto done;
- }
+ overflow = true;
nx *= n;
}
while (lex_match (lexer, T_BY));
+ if (overflow)
+ {
+ lex_ofs_error (lexer, vars_start, lex_ofs (lexer) - 1,
+ _("Too many cross-tabulation variables or dimensions."));
+ goto done;
+ }
if (n_by < 2)
{
bool unused UNUSED = lex_force_match (lexer, T_BY);
13 | CROSSTABS **.
| ^~"
-"crosstabs.sps:15.8-16.59: error: CROSSTABS: Too many cross-tabulation variables or dimensions.
+"crosstabs.sps:15.8-20.87: error: CROSSTABS: Too many cross-tabulation variables or dimensions.
15 | v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 | BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100
- | -----------------------------------------------------------"
+ | ---------------------------------------------------------------------------------------
+ ... |
+ 20 | BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100 BY v1 to v100.
+ | ---------------------------------------------------------------------------------------"
crosstabs.sps:21: error: CROSSTABS: At least one crosstabulation must be requested (using the TABLES subcommand).