From f7db593edb4c08d2aa551542ee1a8e78dcf57f80 Mon Sep 17 00:00:00 2001 From: Alexey Zaytsev Date: Fri, 18 Jul 2008 03:18:19 +0400 Subject: [PATCH] Can't load precompiled binaries because if missing ungetc Signed-off-by: Alexey Zaytsev --- com32/lua/src/lauxlib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/com32/lua/src/lauxlib.c b/com32/lua/src/lauxlib.c index 10f14e2..de528bc 100644 --- a/com32/lua/src/lauxlib.c +++ b/com32/lua/src/lauxlib.c @@ -564,6 +564,7 @@ LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) { lf.f = fopen(filename, "r"); if (lf.f == NULL) return errfile(L, "open", fnameindex); } +#if 0 c = getc(lf.f); if (c == '#') { /* Unix exec. file? */ lf.extraline = 1; @@ -578,6 +579,7 @@ LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) { lf.extraline = 0; } ungetc(c, lf.f); +#endif status = lua_load(L, getF, &lf, lua_tostring(L, -1)); readstatus = ferror(lf.f); if (filename) fclose(lf.f); /* close file (even in case of errors) */ -- 2.7.4