From: Ben Pfaff Date: Tue, 3 May 2005 05:32:21 +0000 (+0000) Subject: Check token type before trying to match tokid. Fixes PR 12923. X-Git-Tag: v0.4.0~100 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbb0228a4c98cbf4756ba651fda158c1565b3b55;p=pspp-builds.git Check token type before trying to match tokid. Fixes PR 12923. --- diff --git a/src/ChangeLog b/src/ChangeLog index 51aec571..a2ae0c91 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,12 @@ +Mon May 2 22:28:17 2005 Ben Pfaff + + * get.c: (cmd_match_files) Check token type before trying to match + tokid. Fixes PR 12923. + Mon May 2 22:16:51 2005 Ben Pfaff - * flip.c: [HAVE_SYS_TYPES_H] Include . + * flip.c: [HAVE_SYS_TYPES_H] Include . Fixes PR + 12789. Mon May 2 22:02:52 2005 Ben Pfaff diff --git a/src/get.c b/src/get.c index 851059ca..0073383b 100644 --- a/src/get.c +++ b/src/get.c @@ -728,7 +728,8 @@ cmd_match_files (void) dict_set_case_limit (mtf.dict, dict_get_case_limit (default_dict)); lex_match ('/'); - while (lex_id_match ("FILE", tokid) || lex_id_match ("TABLE", tokid)) + while (token == T_ID + && (lex_id_match ("FILE", tokid) || lex_id_match ("TABLE", tokid))) { struct mtf_file *file = xmalloc (sizeof *file); @@ -741,6 +742,7 @@ cmd_match_files (void) } else assert (0); + lex_match ('='); file->by = NULL; file->handle = NULL; @@ -774,9 +776,7 @@ cmd_match_files (void) mtf.head = file; first_table->prev = file; } - - lex_match ('='); - + if (lex_match ('*')) { file->handle = NULL;