aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-exp.y
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-12-15 19:28:31 +0000
committerTom Tromey <tromey@redhat.com>2010-12-15 19:28:31 +0000
commit45ccdddcbfd0eea3165b732191613dc85f016b8c (patch)
tree13dc6372d657f40e3c03a9c8e887c7e6b7efd1cd /gdb/f-exp.y
parenta86caf66bb66054f86ef6bed3c5fa6d68444734b (diff)
downloadgdb-45ccdddcbfd0eea3165b732191613dc85f016b8c.zip
gdb-45ccdddcbfd0eea3165b732191613dc85f016b8c.tar.gz
gdb-45ccdddcbfd0eea3165b732191613dc85f016b8c.tar.bz2
2010-12-15 Greg Watson <g.watson@computer.org>
* f-exp.y (yylex): Check entire token against keywords.
Diffstat (limited to 'gdb/f-exp.y')
-rw-r--r--gdb/f-exp.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index 415819a..feffe79 100644
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -1150,8 +1150,8 @@ yylex ()
/* Catch specific keywords. */
for (i = 0; f77_keywords[i].operator != NULL; i++)
- if (strncmp (tokstart, f77_keywords[i].operator,
- strlen(f77_keywords[i].operator)) == 0)
+ if (strlen (f77_keywords[i].operator) == namelen
+ && strncmp (tokstart, f77_keywords[i].operator, namelen) == 0)
{
/* lexptr += strlen(f77_keywords[i].operator); */
yylval.opcode = f77_keywords[i].opcode;