lua

A copy of the Lua development repository
Log | Files | Refs | README

commit cae1eff9014ec7376f4faa6c5b0e6338382f3e82
parent f83bc86e5140f929e616d6b885813513e62ed5fb
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Tue,  1 Apr 1997 18:23:00 -0300

small "bugs" detected by Purify: cannot read "next" after 0.

Diffstat:
Mlex.c | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lex.c b/lex.c @@ -1,4 +1,4 @@ -char *rcs_lex = "$Id: lex.c,v 2.43 1997/03/18 15:30:50 roberto Exp roberto $"; +char *rcs_lex = "$Id: lex.c,v 2.44 1997/03/31 14:17:09 roberto Exp roberto $"; #include <ctype.h> @@ -337,11 +337,13 @@ int luaY_lex (void) return NUMBER; } - default: /* also end of program (0) */ - { + case 0: + save(0); + return 0; + + default: save_and_next(); return yytext[0]; - } } } }