diff options
Diffstat (limited to 'inout.c')
-rw-r--r-- | inout.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -5,7 +5,7 @@ | |||
5 | ** Also provides some predefined lua functions. | 5 | ** Also provides some predefined lua functions. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | char *rcs_inout="$Id: inout.c,v 2.68 1997/06/26 20:47:43 roberto Exp roberto $"; | 8 | char *rcs_inout="$Id: inout.c,v 2.69 1997/06/27 22:38:49 roberto Exp roberto $"; |
9 | 9 | ||
10 | #include <stdio.h> | 10 | #include <stdio.h> |
11 | #include <string.h> | 11 | #include <string.h> |
@@ -73,7 +73,8 @@ int lua_dofile (char *filename) | |||
73 | } | 73 | } |
74 | else { | 74 | else { |
75 | if (c == '#') | 75 | if (c == '#') |
76 | while ((c=fgetc(f)) != '\n') /* skip first line */; | 76 | while ((c=fgetc(f)) != '\n' && c != 0) /* skip first line */; |
77 | ungetc(c, f); | ||
77 | status = lua_doFILE(f, 0); | 78 | status = lua_doFILE(f, 0); |
78 | } | 79 | } |
79 | if (f != stdin) | 80 | if (f != stdin) |