From 9cf2cd2a1177ea7529890e6004d94fb092a7c92a Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Tue, 14 Jun 2011 12:47:48 +0200 Subject: [PATCH] Fix bytecode loading on Windows. --- src/lib_aux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;