Fix handling of failed fp:read(..., "*n").

This commit is contained in:
Mike Pall 2010-05-15 18:10:41 +02:00
parent 655401f3e9
commit c7a3103f41

View File

@ -140,6 +140,7 @@ static int io_file_readnum(lua_State *L, FILE *fp)
setnumV(L->top++, d); setnumV(L->top++, d);
return 1; return 1;
} else { } else {
setnilV(L->top++);
return 0; return 0;
} }
} }