From: Kung Hsu Date: Wed, 16 Nov 1994 00:21:16 +0000 (+0000) Subject: * c-exp.y (yylex): Fix a bug in template scanning. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e38e7f47a8bde45413d94878b5e9250d8f22cb4e;p=binutils-gdb.git * c-exp.y (yylex): Fix a bug in template scanning. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b71aaa07766..b4ba7c73d7a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +Tue Nov 15 16:18:52 1994 Kung Hsu (kung@mexican.cygnus.com) + + * c-exp.y (yylex): Fix a bug in template scanning. + Tue Nov 15 14:25:47 1994 Stan Shebs (shebs@andros.cygnus.com) * i386-stub.c, m68k-stub.c, sparc-stub.c, sparcl-stub.c: Mask out diff --git a/gdb/c-exp.y b/gdb/c-exp.y index bb87545f7ce..e8b0d7e06ff 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]; }