소스 검색

Fix bytecode loading on Windows.

Mike Pall 14 년 전
부모
커밋
9cf2cd2a11
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;