aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-exp.y
diff options
context:
space:
mode:
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;