diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-04-01 18:23:20 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-04-01 18:23:20 -0300 |
| commit | cae1eff9014ec7376f4faa6c5b0e6338382f3e82 (patch) | |
| tree | 3efc4c7ea610bcfa4608c74dd3290fc1d87ac946 | |
| parent | f83bc86e5140f929e616d6b885813513e62ed5fb (diff) | |
| download | lua-cae1eff9014ec7376f4faa6c5b0e6338382f3e82.tar.gz lua-cae1eff9014ec7376f4faa6c5b0e6338382f3e82.tar.bz2 lua-cae1eff9014ec7376f4faa6c5b0e6338382f3e82.zip | |
small "bugs" detected by Purify: cannot read "next" after 0.
| -rw-r--r-- | lex.c | 10 |
1 files changed, 6 insertions, 4 deletions
| @@ -1,4 +1,4 @@ | |||
| 1 | char *rcs_lex = "$Id: lex.c,v 2.43 1997/03/18 15:30:50 roberto Exp roberto $"; | 1 | char *rcs_lex = "$Id: lex.c,v 2.44 1997/03/31 14:17:09 roberto Exp roberto $"; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | #include <ctype.h> | 4 | #include <ctype.h> |
| @@ -337,11 +337,13 @@ int luaY_lex (void) | |||
| 337 | return NUMBER; | 337 | return NUMBER; |
| 338 | } | 338 | } |
| 339 | 339 | ||
| 340 | default: /* also end of program (0) */ | 340 | case 0: |
| 341 | { | 341 | save(0); |
| 342 | return 0; | ||
| 343 | |||
| 344 | default: | ||
| 342 | save_and_next(); | 345 | save_and_next(); |
| 343 | return yytext[0]; | 346 | return yytext[0]; |
| 344 | } | ||
| 345 | } | 347 | } |
| 346 | } | 348 | } |
| 347 | } | 349 | } |
