From 45ccdddcbfd0eea3165b732191613dc85f016b8c Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 15 Dec 2010 19:28:31 +0000 Subject: [PATCH] 2010-12-15 Greg Watson * f-exp.y (yylex): Check entire token against keywords. --- gdb/ChangeLog | 4 ++++ gdb/f-exp.y | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 48a381f7722..013ff837c89 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-12-15 Greg Watson + + * f-exp.y (yylex): Check entire token against keywords. + 2010-12-15 Doug Evans Rename "maint set python auto-load" to "set auto-load-scripts". diff --git a/gdb/f-exp.y b/gdb/f-exp.y index 415819a0fc8..feffe7999bc 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; -- 2.30.2