From: Mike Pall Date: Tue, 14 Jun 2011 10:47:48 +0000 (+0200) Subject: Fix bytecode loading on Windows. X-Git-Tag: v2.0.0-beta8~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cf2cd2a1177ea7529890e6004d94fb092a7c92a;p=thirdparty%2FLuaJIT.git Fix bytecode loading on Windows. --- diff --git a/src/lib_aux.c b/src/lib_aux.c index bb5995aa..628d6a57 100644 --- a/src/lib_aux.c +++ b/src/lib_aux.c @@ -255,7 +255,7 @@ LUALIB_API int luaL_loadfile(lua_State *L, const char *filename) int status; const char *chunkname; if (filename) { - ctx.fp = fopen(filename, "r"); + ctx.fp = fopen(filename, "rb"); if (ctx.fp == NULL) { lua_pushfstring(L, "cannot open %s: %s", filename, strerror(errno)); return LUA_ERRFILE;