summaryrefslogtreecommitdiff
path: root/src/liolib.c
diff options
context:
space:
mode:
authorPeter Drahos <drahosp@gmail.com>2011-03-17 14:37:47 +0100
committerPeter Drahos <drahosp@gmail.com>2011-03-17 14:37:47 +0100
commit1c87c3327f66c33f5142e9aebd7a1b2dfd116238 (patch)
tree63d1d8a532b4ff6d3d41ee53e6e3755dd06d97a9 /src/liolib.c
parenteb697165069fed8f6623b9bc9048d310f6cc68e0 (diff)
downloadlua-1c87c3327f66c33f5142e9aebd7a1b2dfd116238.tar.gz
Applied lua patch 5.1.4-3
Diffstat (limited to 'src/liolib.c')
-rw-r--r--src/liolib.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/liolib.c b/src/liolib.c
index e79ed1c..649f9a5 100644
--- a/src/liolib.c
+++ b/src/liolib.c
@@ -1,5 +1,5 @@
/*
-** $Id: liolib.c,v 2.73.1.3 2008/01/18 17:47:43 roberto Exp $
+** $Id: liolib.c,v 2.73.1.4 2010/05/14 15:33:51 roberto Exp $
** Standard I/O (and system) library
** See Copyright Notice in lua.h
*/
@@ -276,7 +276,10 @@ static int read_number (lua_State *L, FILE *f) {
lua_pushnumber(L, d);
return 1;
}
- else return 0; /* read fails */
+ else {
+ lua_pushnil(L); /* "result" to be removed */
+ return 0; /* read fails */
+ }
}