* ch-exp.y (yylex): Fix off-by-one error when converting string to
lowercase. Null terminate new string.
This commit is contained in:
parent
c2e00af68e
commit
a30e208739
@ -1,5 +1,8 @@
|
||||
Fri Nov 11 10:51:07 1994 Jeff Law (law@snake.cs.utah.edu)
|
||||
|
||||
* ch-exp.y (yylex): Fix off-by-one error when converting string to
|
||||
lowercase. Null terminate new string.
|
||||
|
||||
* hppa-tdep.c (rp_saved): Handle IMPORT stubs too.
|
||||
|
||||
* somsolib.c (som_solib_add): Check the value of __dld_flags, if
|
||||
|
@ -1844,11 +1844,12 @@ yylex ()
|
||||
|
||||
if (inputname != NULL)
|
||||
{
|
||||
char *simplename = (char*) alloca (strlen (inputname));
|
||||
char *simplename = (char*) alloca (strlen (inputname) + 1);
|
||||
|
||||
char *dptr = simplename, *sptr = inputname;
|
||||
for (; *sptr; sptr++)
|
||||
*dptr++ = isupper (*sptr) ? tolower(*sptr) : *sptr;
|
||||
*dptr = '\0';
|
||||
|
||||
/* See if it is a reserved identifier. */
|
||||
for (i = 0; i < sizeof (idtokentab) / sizeof (idtokentab[0]); i++)
|
||||
|
Loading…
Reference in New Issue
Block a user