Explorar o código

Fix bytecode loading on Windows.

Mike Pall %!s(int64=14) %!d(string=hai) anos
pai
achega
9cf2cd2a11
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/lib_aux.c

+ 1 - 1
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;