diff options
author | Kung Hsu <kung@cygnus> | 1994-11-16 00:21:16 +0000 |
---|---|---|
committer | Kung Hsu <kung@cygnus> | 1994-11-16 00:21:16 +0000 |
commit | e38e7f47a8bde45413d94878b5e9250d8f22cb4e (patch) | |
tree | 45107dddffddbe3e74f36e6735561d13bce75a97 /gdb/c-exp.y | |
parent | 2d4838fe0dcca00186f623dce94352572ec05dae (diff) | |
download | gdb-e38e7f47a8bde45413d94878b5e9250d8f22cb4e.zip gdb-e38e7f47a8bde45413d94878b5e9250d8f22cb4e.tar.gz gdb-e38e7f47a8bde45413d94878b5e9250d8f22cb4e.tar.bz2 |
* c-exp.y (yylex): Fix a bug in template scanning.
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r-- | gdb/c-exp.y | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y index bb87545..e8b0d7e 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -1366,7 +1366,12 @@ yylex () || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '<');) { if (c == '<') - while (tokstart[++namelen] != '>'); + { + int i = namelen; + while (tokstart[++i] && tokstart[i] != '>'); + if (tokstart[i] == '>') + namelen = i; + } c = tokstart[++namelen]; } |