diff options
Diffstat (limited to 'opcode.c')
| -rw-r--r-- | opcode.c | 10 |
1 files changed, 8 insertions, 2 deletions
| @@ -3,7 +3,7 @@ | |||
| 3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | char *rcs_opcode="$Id: opcode.c,v 3.70 1996/06/10 19:36:24 roberto Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 3.71 1996/07/24 17:55:57 roberto Exp roberto $"; |
| 7 | 7 | ||
| 8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
| 9 | #include <stdio.h> | 9 | #include <stdio.h> |
| @@ -551,7 +551,13 @@ int lua_dofile (char *filename) | |||
| 551 | return 2; | 551 | return 2; |
| 552 | c = fgetc(f); | 552 | c = fgetc(f); |
| 553 | ungetc(c, f); | 553 | ungetc(c, f); |
| 554 | status = (c == ID_CHUNK) ? luaI_undump(f) : do_protectedmain(); | 554 | if (c == ID_CHUNK) |
| 555 | status = luaI_undump(f); | ||
| 556 | else { | ||
| 557 | if (c == '#') | ||
| 558 | while ((c=fgetc(f)) != '\n') /* skip first line */; | ||
| 559 | status = do_protectedmain(); | ||
| 560 | } | ||
| 555 | lua_closefile(); | 561 | lua_closefile(); |
| 556 | return status; | 562 | return status; |
| 557 | } | 563 | } |
