aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lauxlib.c b/lauxlib.c
index baa67ce6..923105ed 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -811,9 +811,9 @@ LUALIB_API int luaL_loadfilex (lua_State *L, const char *filename,
811 } 811 }
812 if (c != EOF) 812 if (c != EOF)
813 lf.buff[lf.n++] = c; /* 'c' is the first character of the stream */ 813 lf.buff[lf.n++] = c; /* 'c' is the first character of the stream */
814 errno = 0;
814 status = lua_load(L, getF, &lf, lua_tostring(L, -1), mode); 815 status = lua_load(L, getF, &lf, lua_tostring(L, -1), mode);
815 readstatus = ferror(lf.f); 816 readstatus = ferror(lf.f);
816 errno = 0; /* no useful error number until here */
817 if (filename) fclose(lf.f); /* close file (even in case of errors) */ 817 if (filename) fclose(lf.f); /* close file (even in case of errors) */
818 if (readstatus) { 818 if (readstatus) {
819 lua_settop(L, fnameindex); /* ignore results from 'lua_load' */ 819 lua_settop(L, fnameindex); /* ignore results from 'lua_load' */