]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix bytecode loading on Windows.
authorMike Pall <mike>
Tue, 14 Jun 2011 10:47:48 +0000 (12:47 +0200)
committerMike Pall <mike>
Tue, 14 Jun 2011 10:47:48 +0000 (12:47 +0200)
src/lib_aux.c

index bb5995aa97ef3c342cbfdfa879f80789c1c6f572..628d6a57f65b28995b4ce2ae18ad8c1058cb9cdd 100644 (file)
@@ -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;