From c7a3103f41616defdd639ead97ce4ced18ad2206 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sat, 15 May 2010 18:10:41 +0200 Subject: [PATCH] Fix handling of failed fp:read(..., "*n"). --- src/lib_io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib_io.c b/src/lib_io.c index e8eb09cb..787fdc6b 100644 --- a/src/lib_io.c +++ b/src/lib_io.c @@ -140,6 +140,7 @@ static int io_file_readnum(lua_State *L, FILE *fp) setnumV(L->top++, d); return 1; } else { + setnilV(L->top++); return 0; } }