aboutsummaryrefslogtreecommitdiff
path: root/liolib.c
diff options
context:
space:
mode:
Diffstat (limited to 'liolib.c')
-rw-r--r--liolib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/liolib.c b/liolib.c
index 718058f2..6282b5c4 100644
--- a/liolib.c
+++ b/liolib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: liolib.c,v 2.83 2009/11/24 12:05:44 roberto Exp roberto $ 2** $Id: liolib.c,v 2.84 2009/12/17 13:08:51 roberto Exp roberto $
3** Standard I/O (and system) library 3** Standard I/O (and system) library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -336,7 +336,7 @@ static int read_line (lua_State *L, FILE *f) {
336 char *p = luaL_prepbuffer(&b); 336 char *p = luaL_prepbuffer(&b);
337 if (fgets(p, LUAL_BUFFERSIZE, f) == NULL) { /* eof? */ 337 if (fgets(p, LUAL_BUFFERSIZE, f) == NULL) { /* eof? */
338 luaL_pushresult(&b); /* close buffer */ 338 luaL_pushresult(&b); /* close buffer */
339 return (lua_objlen(L, -1) > 0); /* check whether read something */ 339 return (lua_rawlen(L, -1) > 0); /* check whether read something */
340 } 340 }
341 l = strlen(p); 341 l = strlen(p);
342 if (l == 0 || p[l-1] != '\n') 342 if (l == 0 || p[l-1] != '\n')