diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib_aux.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
| 255 | int status; | 255 | int status; |
| 256 | const char *chunkname; | 256 | const char *chunkname; |
| 257 | if (filename) { | 257 | if (filename) { |
| 258 | ctx.fp = fopen(filename, "r"); | 258 | ctx.fp = fopen(filename, "rb"); |
| 259 | if (ctx.fp == NULL) { | 259 | if (ctx.fp == NULL) { |
| 260 | lua_pushfstring(L, "cannot open %s: %s", filename, strerror(errno)); | 260 | lua_pushfstring(L, "cannot open %s: %s", filename, strerror(errno)); |
| 261 | return LUA_ERRFILE; | 261 | return LUA_ERRFILE; |
