diff options
Diffstat (limited to '')
| -rw-r--r-- | opcode.c | 6 |
1 files changed, 4 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.75 1996/09/24 17:30:28 roberto Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 3.76 1996/09/24 21:46:44 roberto Exp roberto $"; |
| 7 | 7 | ||
| 8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
| 9 | #include <stdio.h> | 9 | #include <stdio.h> |
| @@ -548,8 +548,10 @@ int lua_dofile (char *filename) | |||
| 548 | return 2; | 548 | return 2; |
| 549 | c = fgetc(f); | 549 | c = fgetc(f); |
| 550 | ungetc(c, f); | 550 | ungetc(c, f); |
| 551 | if (c == ID_CHUNK) | 551 | if (c == ID_CHUNK) { |
| 552 | f = freopen(filename, "rb", f); /* set binary mode */ | ||
| 552 | status = luaI_undump(f); | 553 | status = luaI_undump(f); |
| 554 | } | ||
| 553 | else { | 555 | else { |
| 554 | if (c == '#') | 556 | if (c == '#') |
| 555 | while ((c=fgetc(f)) != '\n') /* skip first line */; | 557 | while ((c=fgetc(f)) != '\n') /* skip first line */; |
