diff options
Diffstat (limited to 'iolib.c')
-rw-r--r-- | iolib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** Input/output library to LUA | 3 | ** Input/output library to LUA |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_iolib="$Id: iolib.c,v 1.21 1995/02/06 19:36:13 roberto Exp roberto $"; | 6 | char *rcs_iolib="$Id: iolib.c,v 1.22 1995/10/04 13:53:10 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <stdio.h> | 8 | #include <stdio.h> |
9 | #include <ctype.h> | 9 | #include <ctype.h> |
@@ -251,7 +251,7 @@ static void io_read (void) | |||
251 | char f[80]; | 251 | char f[80]; |
252 | char s[256]; | 252 | char s[256]; |
253 | sprintf (f, "%%%ds", m); | 253 | sprintf (f, "%%%ds", m); |
254 | if (fgets (s, m, in) == NULL) | 254 | if (fgets (s, m+1, in) == NULL) |
255 | { | 255 | { |
256 | lua_pushnil(); | 256 | lua_pushnil(); |
257 | return; | 257 | return; |